curl https://api.cloudflare.com/client/v4/user/tokens/verify -H 'Authorization: Bearer $CF_API_TOKEN' | jq

Category: Cloudflare

curl https://api.cloudflare.com/client/v4/user/tokens/verify -H 'Authorization: Bearer $CF_API_TOKEN' | jq

Verify a Cloudflare API token

Asks the API whether the token in $CF_API_TOKEN is valid and what it can do. Caveat: zone-scoped tokens can report invalid here even when they work fine on DNS endpoints, so treat a failure as a signal to test the real endpoint instead of assuming the token is dead. Every REST call below needs this Bearer header.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.