Authentication

The Codex API is authenticated using an API key. You can get your API key from the dashboard.

After you’ve got your API key, you can use it to make requests to the Codex API.

Make sure to keep your API key private and secure.

For example, you can test your api key by running the following in your terminal, after replacing <your-api-key> with your actual api key.

curl
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: <your-api-key>" \
  -d '{"query": "{ getNetworks { id, name } }"}' \
  https://graph.codex.io/graphql

Your key must be included in the Authorization header for every request.

You’ll notice throughout the docs that we will have “Try it” sections. You’ll need to put in your API key once, after which you can execute real queries against the api to see the actual results using a mini version of the explorer

If you’re having trouble, please reach out to us on discord.