ASN API use always get "code":10000,"message":"Authentication error"

Hi guys,

i’m trying to use the asn overview page by python requests, but even if i use a token generated with all the reading access i always get the above error.

Where am i wrong?

As “account_id” i use the id that i found after having validated the token from the cURL.

Thanks

1 Like

image

You should use

"Authorization": "Bearer {token}".

or

"X-Auth-Email": "EMAIL"
"X-Auth-Key": "XXX"

Not both.

If using the token, then it needs to have Account : Intel : Read permissions.

1 Like

Hi! Thanks for the answer! Unluckily in both cases, i get the same authentication error again, even with intel: read permission :frowning:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

Are you the superadmin on the account? Is it the same account you are using here? If not, lmk and I will kick off a private note asking for details.

hi @cloonan , thanks! yes i’m using the same account as here, so i think it’s a “super admin” account

1 Like

Thank you & sorry, can you give it a try in incognito mode? I made some adjustments that I :crossed_fingers: think will help. If not and you keep getting the error, can you create an Account ticket and share your ticket number here?

You can open an Account ticket here, https://dash.cloudflare.com/?to=/:account/support

Hi @cloonan , if i try to open the ticket i turn back to the community page! I’m still getting the same error… i’m trying to use the API by Python, so don’t using the browser.

Thanks for the help!

Are you selecting account when you begin the ticket process?

Are you the superadmin and/or does the token you are using have the appropriate permissions?

for my user i see this:

and for the token this: