Skip to content
Analytics
Visit Analytics on GitHub
Set theme to dark (⇧+D)

Configure GraphQL client endpoint and HTTP headers

  1. Launch GraphiQL.
  2. Click Edit HTTP Headers. Click Edit HTTP Headers The Edit HTTP Headers window appears. Edit HTTP Headers Window
  3. Click Add Header. Click Add Header
  4. Enter X-AUTH-EMAIL in the Header name field and your email address registered with Cloudflare in the Header value field, and click Save.
  5. To configure authentication, click Add Header. You can use Cloudflare Analytics API token authentication (recommended) or Cloudflare API key authentication.
    • Token authentication: Enter Authorization in the Header Name field, and enter Bearer {your-analytics-token} in the Header value field, then click Save. HTTP Headers
    • Key authentication: Enter X-AUTH-KEY in the Header Name field, and paste your Global API Key in the Header value field, then click Save. HTTP Headers
  6. Click anywhere outside the Edit HTTP Headers window in GraphiQL to close it and return to the main GraphiQL display.
  7. Enter https://api.cloudflare.com/client/v4/graphql in the GraphQL Endpoint field Edit GraphQL Endpoint

Now that you have configured authentication with a Cloudflare API key, you are ready to run queries using GraphiQL.