Configure GraphQL client endpoint and HTTP headers
-
Launch GraphiQL ↗.
-
Select Edit HTTP Headers.
The Edit HTTP Headers window appears. -
Select Add Header to configure authentication. 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 select Save. -
Key authentication:
Enter
X-AUTH-EMAIL
in the Header name field and your email address registered with Cloudflare in the Header value field, and select Save.Select Add Header to add a second header. Enter
X-AUTH-KEY
in the Header Name field, and paste your Global API Key in the Header value field, then select Save.
-
-
Select anywhere outside the Edit HTTP Headers window in GraphiQL to close it and return to the main GraphiQL display.
-
Enter
https://api.cloudflare.com/client/v4/graphql
in the GraphQL Endpoint field.
Now that you have configured authentication, you are ready to run queries using GraphiQL.
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark