For Workers & Pages, what is the name of the domain?
/accounts/{account_id}/registrar/domains
What is the error number?
10000
What is the error message?
Authentication error
What is the issue or error you’re encountering
When using an API Token with ‘Read all resources’ permissions, I cannot access the /accounts/{account_id}/registrar/domains route. I receive a code 10000 with an Authentication error message. However, when I use a global (legacy) API key instead, the same request works perfectly. This suggests there might be an issue with API Token permissions for this specific endpoint.
What steps have you taken to resolve the issue?
I have tried the following steps to resolve the issue:
1. Created a new API Token with ‘Read all resources’ permissions to ensure it had the broadest possible read access
2. Verified that the API Token works correctly for other endpoints and routes
3. Confirmed that the account ID being used is correct
4. Tested the same exact request using a global (legacy) API key, which worked successfully
5. Checked the Cloudflare API documentation to ensure I’m using the correct endpoint format
6. Verified that my authentication headers are properly formatted for both methods
What are the steps to reproduce the issue?
Steps to reproduce the issue:
1. Create an API Token in the Cloudflare dashboard with ‘Read all resources’ permissions
2. Attempt to access the /accounts/{account_id}/registrar/domains endpoint using this token:
curl -X GET “https://api.cloudflare.com/client/v4/accounts/{account_id}/registrar/domains”
-H “Authorization: Bearer {api_token}”
-H “Content-Type: application/json”
3. Observe the error response with code 10000 and Authentication error message
4. For comparison, try the same request using a global API key:
curl -X GET “https://api.cloudflare.com/client/v4/accounts/{account_id}/registrar/domains”
-H “X-Auth-Email: {email}”
-H “X-Auth-Key: {global_api_key}”
-H “Content-Type: application/json”
5. Note that the second request succeeds while the first fails