Support API Tokens
See original GitHub issueCloudflare have launched API tokens for use with their API but the headers required to use it are different from the current implementation.
I’ve had a look and switching the headers would potentially require a BC break so wanted to get some input before putting in a PR.
Headers X-Auth-Email
and X-Auth-Key
(set here https://github.com/danielpigott/cloudflare-cli/blob/master/lib/apiClient.js#L14) are skipped and Authorize: Bearer <token>
is used instead.
Should be fairly trivial to make both work; either by adding a new option to the cli wrapper or allowing email to be nullable (and assuming API token should be used if not set).
Let me know what you think and I’ll put a PR in.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Generating a new API token - Zendesk help
In Admin Center, click Apps and integrations in the sidebar, then select APIs > Zendesk APIs. · Click the Settings tab, and make...
Read more >Manage API tokens for your Atlassian account
API tokens can be used with the Jira Cloud and Confluence Cloud REST APIs. If you're using Bitbucket Cloud, see App passwords. Create...
Read more >Zendesk API tokens - GitLab
Zendesk API tokens are used in authentication for Zendesk API requests. These tokens are always at the administrator level and cannot be issued...
Read more >Using API tokens | Fastly Help Guides
API tokens are unique security credentials that allow human users and automated systems to prove their identity to Fastly, ...
Read more >API Tokens - LogicMonitor
The API Tokens Tab in Settings | User Access displays all API Tokens across all account users. For each token displayed, you can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Definitely would be good to support this, though I would want to ensure it is backwards compatible. I will take a look and update this issue with my suggestions.
I have now published the changes as v4.0.0