API CloudFlare - "success":false, - Help me to resolve this error please

Hello,

My site is using CloudeFlare servers and is working properly.
When I test the API for my domain (https://api.cloudflare.com/client/v4/zones/51bbb3d38b8fb0220b06460f3ee7173c/settings/minify)
I get this message:
“{“success”:false, “errors”:[{“code”:9106, “message”: “Missing X-Auth-Email header”},{“code”:9107, “message”: “Missing X-Auth-Key header”}], “messages”:, “result”:null}”

Can you help me to solve these errors please?
Missing X-Auth-Email header & Missing X-Auth-Key header

Where to find my key on my profile?
and enter the requested information?

Thank you very much for your attention and support.

X-Auth-Email is your Account email address that you use to sign in to the Cloudflare Dashboard
X-Auth-Key is your API token or Global Key and can be found here (https://dash.cloudflare.com/profile/api-tokens)

For more info you can have a look here
Cloudflare API v4 Documentation

Ok I found them,
and where and how do I insert them?
My CloudFlare profile contains my email address and my global API key.
my goal is to not have this error message anymore in order to get “success”:true, during the test.

thanks

Hi,

You can just copy the code from the API doc, and paste it onto your command-line interface as a cURL command, after editing the relevant fields (zone ID, email etc).

Alternatively, you can use a tool such as Postman, which makes these things easier to test and do repeatedly. (You’d then copy the code from the docs, and click Import > Raw on Postman’s interface).
:
https://api.cloudflare.com/#zone-settings-get-minify-setting

thank you, it seems very easy but I have never used cURL…
sorry for my ignorance…

I need to enter my email and key somewhere because all my APIs report that this information is missing!
There must be a unique place to enter these informations!? (X-Auth-Email / X-Auth-Key)

Maybe edit a cURL like this? :
curl -H “X-Auth-Email: [email protected]
-H “X-Auth-Key: ******************” \

would this be enough to solve my problem?

but I don’t know where to find the editor of this cURL command.

an other way?

thanks

I suggest you google “curl tutorial” and try to familiarize yourself with this tool. The whole Cloudflare API documentation for v4 gives examples using cURL, so if your not familiar with it, you may have trouble using the API.

2 Likes

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