Cloudflare & DNS

Cloudflare API tokens: set up with least privilege

Garou Ops Team · 6 min read · Updated 2026

A powerful API token is convenient right up until it leaks. Scoping tokens to the minimum they need is one of the cheapest security wins you can make.

Start from the task, not the token

List exactly what the automation must do, then grant only those permissions.

Separate tokens per purpose make it easy to revoke one without breaking everything.

Store and rotate safely

Keep tokens encrypted and never in page source or client-side code.

Rotate on a schedule and immediately if you suspect exposure.

In short

Least-privilege tokens cost a few extra minutes and save you from a very bad day. Scope narrowly, store encrypted, rotate often.

Running many sites? Garou Ops brings domains, DNS, hosting and monitoring into one panel. Apply for access →