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
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions products/stream/src/content/security/signed-urls.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You can [revoke a key](#revoking-keys) anytime for any reason.
Upon creation you will get a RSA private key in PEM and JWK formats. Keys are created, used and deleted independently of videos. Every key can sign any of your videos.

```javascript
// curl -X POST -H "X-Auth-Email: ${EMAIL}" -H "X-Auth-Key: ${API-KEY}" "https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/keys"
// curl -X POST -H "X-Auth-Email: ${EMAIL}" -H "Authorization: Bearer ${API-KEY}" "https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/keys"

{
"result": {
Expand All @@ -42,7 +42,7 @@ Restricting viewing can be done by updating the video's metadata.

```javascript

// curl -X POST -H "X-Auth-Email: ${EMAIL}" -H "X-Auth-Key: ${API-KEY}" "https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/{VIDEO-ID}" -H "Content-Type: application/json" -d '{"uid": "{VIDEO-ID}", "requireSignedURLs": true }'
// curl -X POST -H "X-Auth-Email: ${EMAIL}" -H "Authorization: Bearer ${API-KEY}" "https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/{VIDEO-ID}" -H "Content-Type: application/json" -d '{"uid": "{VIDEO-ID}", "requireSignedURLs": true }'

{
"result": {
Expand Down Expand Up @@ -137,7 +137,7 @@ You can create up to 1,000 keys and rotate them at your convenience.
Once revoked all tokens created with that key will be invalidated.

```javascript
// curl -X DELETE -H "X-Auth-Email: ${EMAIL}" -H "X-Auth-Key: ${API-KEY}" "https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/keys/{KEY-ID}"
// curl -X DELETE -H "X-Auth-Email: ${EMAIL}" -H "Authorization: Bearer ${API-KEY}" "https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/keys/{KEY-ID}"

{
"result": "Revoked",
Expand Down