Error 1010 on API logs received endpoint request

What is the name of the domain?

What is the error number?

1010

What is the error message?

auth.forbidden

What is the issue you’re encountering

The following request return an error code 1010

What are the steps to reproduce the issue?

Configure a token to interact with Cloudflare API with permissions (All zones - Logs:Read, Analytics:Read / MAIN - Access: Custom Pages:Read, Account Analytics:Read, Access: Audit Logs:Read, Logs:Read, Account Filter Lists:Read) and a proper IP allowlist

Test token with this endpoint https://api.cloudflare.com/client/v4/user/tokens/verify
{
“result”: {
“id”: “xyz123”,
“status”: “active”,
“not_before”: “2024-07-05T00:00:00Z”,
“expires_on”: “2025-07-06T23:59:59Z”
},
“success”: true,
“errors”: ,
“messages”: [
{
“code”: 10000,
“message”: “This API Token is valid and active”,
“type”: null
}
]
}

Try to retrieve received logs with this call:
GET https://api.cloudflare.com/client/v4/zones/xyz123/logs/received?start=2024-08-22&end=2024-08-23&fields=ClientASN

Get this error:
{
“result”: null,
“success”: false,
“errors”: [
{
“code”: 1010,
“message”: “auth.forbidden”
}
],
“messages”:
}

For both calls Authorization header is used with this content:
Bearer xyz123

Any help will be appreciated.

Hi there,

Thanks for contacting Cloudflare Community, we’re sorry to read that you’re experiencing difficulties.

I see /logs/received?start=2024-08-22&end=2024-08-23&fields=ClientASN in your query. Is Requesting logs · Cloudflare Logs docs what you are trying to accomplish here?

If so, you are unable to do so as it is only available for Enterprise plan.
I checked both membership account that you have access to and they were not on Enterprise plan.
Logpull · Cloudflare Logs docs

We do offer detailed logs up to seven days for our Enterprise customers using Cloudflare Logs.

With Cloudflare Workers, you can start receiving logs from the edge with a little technical effort, regardless of which plan you are using. For more details, please check the following blog article: https://blog.cloudflare.com/logs-from-the-edge/

If you have any more questions, simply reply to this email and we will be happy to help.

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