I'm getting an 'Unauthorized' error when using my Cloudflare API token. What should I check?

Responsive Ad Header

Question

Grade: Education Subject: Support
I'm getting an 'Unauthorized' error when using my Cloudflare API token. What should I check?
Asked by:
92 Viewed 92 Answers

Answer (92)

Best Answer
(356)
First, verify that the token is still active and hasn't been revoked or deleted. Double-check that the token has the necessary permissions for the API endpoint you're trying to access. Ensure you're using the correct authentication header (e.g., `Authorization: Bearer YOUR_API_TOKEN`). Finally, confirm that the token applies to the zone you're targeting.