Permissions for API token required for Audit Logs

Hi,

I have a question regarding the required API token permissions to view Audit Logs using the Cloudflare API.

As said, I need to retrieve Audit Logs for an account via the Cloudflare API (endpoint is https://api.cloudflare.com/client/v4/accounts/account_id/audit_logs). The problem is that I can’t find which permission I need to give the API token I’m creating to get access to the resource. Every permission I’ve tried until now gives me an 10000 Authentication Error response.

What permissions should I give the token so that the request will work and I’ll get access to the Audit Logs data?
Thanks

1 Like

Hi @ori5 can you clear cache & cookies and try again from incognito mode? Sorry for the issues, let me know if they persist and we’ll figure out next steps.

Hi there,

The user token needs to be an Account Administrator.

Thank you.

1 Like

Hi,
Thank you for your response.

Could you please elaborate on what you meant? Should I add the user to the Super Administrator role and then have access to the account audit logs?

Thanks

Hi @ori5,

Audit Logs access needs the user to be at least an Administrator for the account.
A Super Administrator has access to billing as well.

If thats what you need you can give Super Administrator access.
Please read the documentation for further understanding.

Thank you.

Thank you again,
So to clarify, the user that creates the token must have Admin role in the account? That way audit logs can be accessed?

Thank you

בתאריך יום ה׳, 28 במרץ 2024, 03:59, מאת oshariff via Cloudflare Community ‏<[email protected]>:

Also,
I’d like another clarification. Do you mean that in order for Audit Logs to be accessed, no special permissions are needed to be granted to the API token? Only required for the user to be an Administrator?

Thanks very much

1 Like

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