Need Help with API Token Permissions for Audit Logs

Hello,

I’m encountering an issue when attempting to access audit_logs through the Cloudflare API. I’ve created an API token with read permissions specifically for the ‘audit_logs’ resource, but I keep receiving an ‘Authentication error’. Interestingly, when I use a token with ‘read all resources’ permissions, the request succeeds without any issues.

Given that there are over 50+ resources, I would prefer not to use a token with full read permissions for security reasons. Could anyone advise on the minimum necessary permissions for accessing audit_logs? Any guidance on which specific resource permissions are required alongside audit_logs would be greatly appreciated.

Thank you in advance for your assistance!

Hey there,

Could you add the permission Account - Account Settings - Read to your API token and try again to see if that fixes the issue you are having with the API token? A token with the following permissions should work:

2 Likes

Hey Micky,

This solution worked for me.

Thanks

1 Like

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