Logs - Authorization Error (postman and js)

Hey! I have curl commands working for pulling logs but Postman and code are both returning this error:

{
“success”: false,
“errors”: [
{
“code”: 10000,
“message”: “Authentication error”
}
]
}

The request is: https://api.cloudflare.com/client/v4/zones//logs/received?start=2021-04-25T01:00:00Z&end=2021-04-25T01:10:00Z&sample=0.1
Headers: X-Auth-Email, X-Auth-Key, Content-Type

I tried adding a Bearer authorization, no luck.

You can also see the error I get on the bottom of this blog post (Using Cloudflare API with Postman Collections – Cloudflare Help Center).

& yes, I’m Enterprise.

You’re using a key format header instead of token format. You won’t need the email header.