Wrangler: Add Support for API Tokens

Created on 24 Jul 2019  路  6Comments  路  Source: cloudflare/wrangler

API Keys and API Tokens both work when authenticating with Cloudflare API endpoints: https://api.cloudflare.com/#getting-started-requests.

This is a feature request to add support for using API Tokens, instead of having to use the Global API Key & Email.

category - feature status - needs design user report

Most helpful comment

We are currently planning to have this implemented in Q4 (we are still in planning phase, this is subject to change), if you keep your eye on this issue and PR #471 you'll be kept in the loop!

All 6 comments

Can we deprecate the key-email auth, and have new wrangler config commands only be able to enter API tokens? Now that we can support auth with a narrower scope, it doesn't seem right that we continue to ask for global credentials.

Plus, my guess is users will get confused by the subtle difference between a key and token (which are often used interchangeably by other APIs). Providing both as an option will likely cause confusion.

@Electroid, definitely something we are pursuing! We have an open PR for this issue (#471) but unfortunately it is blocked on the fact that API tokens are not implemented in the Workers UI, and the Cloudflare API does not accept API tokens when publishing to workers.dev. The latter is more important due to the fact that using API tokens would break deploys from wrangler to workers.dev. Keep your eyes peeled for when this is shipped!

@Electroid, definitely something we are pursuing! We have an open PR for this issue (#471) but unfortunately it is blocked on the fact that API tokens are not implemented in the Workers UI, and the Cloudflare API does not accept API tokens when publishing to workers.dev. The latter is more important due to the fact that using API tokens would break deploys from wrangler to workers.dev. Keep your eyes peeled for when this is shipped!

Thanks for the update @EverlastingBugstopper , do you have a timeline for when this will be released?

Thanks,
Ojas

We are currently planning to have this implemented in Q4 (we are still in planning phase, this is subject to change), if you keep your eye on this issue and PR #471 you'll be kept in the loop!

We are currently planning to have this implemented in Q4 (we are still in planning phase, this is subject to change), if you keep your eye on this issue and PR #471 you'll be kept in the loop!

Thank you, subscribed to the thread.

Hi y'all! Until this change is made, it could be very helpful to mention in the readme that a global API key is required鈥擨 couldn't figure out why I was getting Authentication Error until I searched and came across this issue 馃槃

The full developer.cloudflare.com docs do mention using the Global API key, but I'd set up Wrangler entirely using the readme and hadn't seen it!

Was this page helpful?
0 / 5 - 0 ratings