POST /accounts/{account_id}/stream/{identifier}/token
Creates a signed URL token for a video. If a body is not provided in the request, a token is created with default values.
Servers
- https://api.cloudflare.com/client/v4
Path parameters
Name | Type | Required | Description |
---|---|---|---|
identifier |
String | Yes | |
account_id |
String | Yes |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
id |
String | No |
The optional ID of a Stream signing key. If present, the |
exp |
Integer | No |
The optional unix epoch timestamp that specficies the time after a token is not accepted. The maximum time specification is 24 hours from issuing time. If this field is not set, the default is one hour after issuing. |
nbf |
Integer | No |
The optional unix epoch timestamp that specifies the time before a the token is not accepted. If this field is not set, the default is one hour before issuing. |
downloadable |
Boolean | No |
The optional boolean value that enables using signed tokens to access MP4 download links for a video. Default value: false |
accessRules[] |
Array | No |
The optional list of access rule constraints on the token. Access can be blocked or allowed based on an IP, IP range, or by country. Access rules are evaluated from first to last. If a rule matches, the associated action is applied and no further rules are evaluated. |
accessRules[].action |
String | No |
The action to take when a request matches a rule. If the action is Possible values:
|
accessRules[].type |
String | No |
Lists available rule types to match for requests. An Possible values:
|
accessRules[].country[] |
Array | No |
An array of 2-letter country codes in ISO 3166-1 Alpha-2 format used to match requests. |
accessRules[].ip[] |
Array | No |
An array of IPv4 or IPV6 addresses or CIDRs used to match requests. |
pem |
String | No |
The optional base64 encoded private key in PEM format associated with a Stream signing key. If present, the |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.