question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support API Tokens

See original GitHub issue

Cloudflare 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:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
danielpigottcommented, Aug 28, 2019

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.

1reaction
danielpigottcommented, May 2, 2020

I have now published the changes as v4.0.0

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found