API Purge_all gives me authentication error, but other API ok

we are trying to clear CORS headers in the cache, and not sure how to do that. According to cloudflare documentation, we need to do the following:

curl -X POST “https://api.cloudflare.com/client/v4/zones/YOUR-ZONE-ID/purge_cache” \
-H “X-Auth-Email: YOUR-CLOUDFLARE-EMAIL”
-H “X-Auth-Key: YOUR-GLOBAL-API-KEY”
-H “Content-Type: application/json”
–data ‘{“purge_everything”:true}’

tried that, but get {“success”:false,“errors”:[{“code”:10000,“message”:“Authentication error”}]} as response.

I tried other curl commands like curl -svX GET “https://api.cloudflare.com/client/v4/zones/YOUR-ZONE-ID/available_rate_plans
-H “X-Auth-Email: YOUR-CLOUDFLARE-EMAIL”
-H “X-Auth-Key: YOUR-GLOBAL-API-KEY”
-H “Content-Type: application/json”

and those work, but the purge_all not, even though i use the same authentication credentials,

anyone who can help?