API Keys not working?
Tried to request this endpoint https://api.cloudflare.com/client/v4
/accounts/{account_id}/rules/lists/{list_id}/items as mentioned in https://developers.cloudflare.com/api/operations/lists-get-list-items and jI included the api key I generated in my profile per the instructions. I included X-Auth-Email and X-Auth-Key in my headers as the page says are required and I'm getting "Authentication Error". Anyone know what's going on and how to fix this? I've verified the legitimacy of the API Key.
Cloudflare API Documentation
Interact with Cloudflare's products and services via the Cloudflare API
7 Replies
Any help is appreciated
If it's an API Token you need to just use the Authorization header, like
Header Name:
Authorization
Value: Bearer <token>
only the global api key is X-Auth-Email and X-auth-KeySee I saw that answer too and I still am getting "Authentication Error"
Then the question is what permissions you gave the token
Is it possible something is missing here?
I want to say the permission you need is Account Filter Lists but I'm not 100%
WIsh I could just select all, I don't need anything super secure as this is sort of just single-use
I guess for this use a global token is fine
Using global key worked, I appreciate your help @Chaika !