Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating docs to indicate correct Authorization Header for Signed URL requests #2

Closed
wants to merge 1 commit into from

Conversation

kellydunn
Copy link
Contributor

While attempting to integrate our backend with Cloudflare Stream, I was consistently receiving the following error when supplying the "X-Auth-Key: ${API-KEY}" header as the docs indicate:

{"success":false,"errors":[{"code":10000,"message":"Authentication error"}]}

However, when supplying the same API_KEY as an Authorization: Bearer ${API_KEY} header, I'm able to get a successful request.

This PR updates the docs to reflect this.

@adamschwartz adamschwartz added the product:stream Related to Stream product label Oct 1, 2020
@renandincer
Copy link
Member

Hey @kellydunn: Cloudflare API has two authentication methods: API Keys and API Tokens.

You either need to specify X-Auth-Email and X-Auth-Key headers where auth key is your global API key, or a Authorization header with a API Token. The reason you might be getting authentication errors could be because you are using an API Token where a Global API Key is expected.

Here's the page where some differences between tokens and keys are documented: https://support.cloudflare.com/hc/en-us/articles/200167836-Managing-API-Tokens-and-Keys

New developers on Cloudflare seem to use API Tokens rather than Keys so I think we should move all examples in the Stream docs to use Tokens.

@renandincer renandincer self-assigned this Oct 7, 2020
@adamschwartz
Copy link
Contributor

@ispivey @renandincer should this be closed?

@kellydunn
Copy link
Contributor Author

New developers on Cloudflare seem to use API Tokens rather than Keys so I think we should move all examples in the Stream docs to use Tokens.

Word, yeah -- we currently enjoy segmenting access to third-party APIs in our SOA/microservice Architecture by creating Service Specific Access Tokens, not just for cloudflare, but for other services as well. I'd imagine folks would definitely want to follow similar patterns if they wanted to separate access on a service by service level.

@renandincer
Copy link
Member

@adamschwartz I'll push up a change making all examples use auth tokens, rather than auth keys to avoid confusion. Please keep this open for a few days until I get to it.

@renandincer
Copy link
Member

Opened #149 to make this change across the entire Stream docs

@adamschwartz
Copy link
Contributor

@renandincer Should we close this then?

@renandincer
Copy link
Member

Yep! Let's discuss on #149!

marciocloudflare added a commit that referenced this pull request Aug 6, 2021
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 23, 2022

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5a4b7f8
Status: ✅  Deploy successful!
Preview URL: https://35d18397.cloudflare-docs-7ou.pages.dev

View logs

ranbel pushed a commit that referenced this pull request May 4, 2023
kodster28 added a commit that referenced this pull request Jul 12, 2023
* [TEST] Comments on PRs

* another update
@github-actions
Copy link

Files with changes (up to 15)

Original Link Updated Link

kodster28 added a commit that referenced this pull request Jan 17, 2024
kodster28 added a commit that referenced this pull request Jan 17, 2024
* [Chore] Expand ignore list #2

* Update language
@JoshuaYe JoshuaYe mentioned this pull request Aug 16, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product:stream Related to Stream product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants