cloudflare-docs
cloudflare-docs copied to clipboard
r2: add examples for downloading files using API tokens
This PR adds examples on how to authenticate against the R2 API using auth tokens in JavaScript (Node.js), Go, and Python 3.
cc @harshil1712
Deploying cloudflare-docs with
Cloudflare Pages
| Latest commit: |
2311008
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cc7815f7.cloudflare-docs-7ou.pages.dev |
| Branch Preview URL: | https://silverlock-r2-auth-examples.cloudflare-docs-7ou.pages.dev |
Files with changes (up to 15)
| Original Link | Updated Link |
|---|---|
| https://developers.cloudflare.com/r2/api/s3/tokens/ | https://silverlock-r2-auth-examples.cloudflare-docs-7ou.pages.dev/r2/api/s3/tokens/ |
@elithrar, we already have examples for Pre-signed URL in our docs.
JS -> https://developers.cloudflare.com/r2/examples/aws/aws-sdk-js-v3/ Go -> https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/ Python -> https://developers.cloudflare.com/r2/examples/aws/boto3/
I thought you were asking about code examples on creating the tokens via the API.
These aren't for pre-signed URLs. They are for direct token access.
What parts have you believing otherwise?
Ah, my bad. The first part of the pre-signed URL examples are the same as the one in this PR. The only difference I could figure out was the hashed Secret Access Key. I didn't know this was a possibility.
@dcpena @harshil1712 - can one of you update this for the new docs engine? This didn't get merged before the migration.
Closing in favor of https://github.com/cloudflare/cloudflare-docs/pull/16488 which recreates this PR post docs migration.