Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Add Support for API Tokens #354

Closed
GregBrimble opened this issue Jul 24, 2019 · 6 comments · Fixed by #471
Closed

Add Support for API Tokens #354

GregBrimble opened this issue Jul 24, 2019 · 6 comments · Fixed by #471
Assignees
Labels
design feature Feature requests and suggestions

Comments

@GregBrimble
Copy link
Member

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.

@gabbifish gabbifish added feature Feature requests and suggestions status - PR welcome labels Jul 24, 2019
@gabbifish gabbifish self-assigned this Aug 23, 2019
@Electroid
Copy link
Contributor

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.

@EverlastingBugstopper
Copy link
Contributor

@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!

@ojasp
Copy link

ojasp commented Sep 13, 2019

@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

@EverlastingBugstopper
Copy link
Contributor

EverlastingBugstopper commented Sep 13, 2019

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!

@ojasp
Copy link

ojasp commented Sep 14, 2019

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.

@izuchukwu
Copy link

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—I 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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
design feature Feature requests and suggestions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants