Clouflare API token error for DNS edit and Read

I created an API Token for the purpose of installing SSL at my origin server on AWS Lighsail. When I run curl command for verification, I get this error

{“success”:false,“errors”:[{“code”:1001,“message”:“Missing "Authorization" header”}],“me
ssages”:,“result”:null}

What could be the reason and how can I resolve it? For context, DNS records are at Ezoic. They are all proxied to CF with CNAME.

DNS is controlled by ezoic here. Checking at the CF won’t help. you may complete the setup first and then enable proxy as well as ezoic.

So I need to remove Ezoic integration and Cloudflare NS from the domain provider. At domain registrar, I will be using the AWS Lightsail NS?

Or just removing Ezoic integration would be enough? DNS will be at CF in this case. I can pause the CF while installing SSL.

Best bet to begin with and make sure your site works well with SSL first, then dive into Cloudflare.

I leave it to your discretion. For more information on this specific topic, :search: search in the forum. There are related issues to read.

Are you including the required authorization components in your requests?

Yes, this is syntax I used, with my API token created for SSL Edit and Read DNS

curl -X GET "https://api.cloudflare.com/client/v4/zones/cd7d0123e3012345da9420df9514dad0" \
     -H "Content-Type:application/json" \
     -H "Authorization: Bearer YQSn-xWAQiiEh9qM58wZNnyQS7FUdoqGIUAbrh7T"

I hope that’s not the actual token for accessing the DNS records in your account. If so, then it’d be best to revoke that one ASAP.

1 Like

It’s not. Copied it from Cloudflare articel.

2 Likes

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