How to create an API token not linked to a user

We have several users on our cloudflare account. Any of them could leave the company at any point so I don’t want to create an API key that is linked to a user for use with the Cloudflare API. The only way I can find to create an API key is to go into my personal profile and generate one. I can’t find a way to generate an API key for the account itself - one that survives people resigning and being deleted off the account. How do I create a key that is linked to the account and not a user?

I also found service tokens, which looks like normal OAuth client/secret and these seem to be linked to the account and not a user, which is great, but there’s no way that I can find to generate a bearer token for one for use with the Cloudflare API. If this is supported, how do I create an API bearer token using the client and secret?

Right now, there is no way to create a token tied to an account. The recommendation is to create a service account with an email like cloudflare@<your domain> and make API tokens for that.

2 Likes

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