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

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 pem field is also required.

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 block, the signed token blocks views for viewers matching the rule.

Possible values:

  • "block"
  • "allow"
accessRules[].type String No

Lists available rule types to match for requests. An any type matches all requests and can be used as a wildcard to apply default actions after other rules.

Possible values:

  • "ip.src"
  • "any"
  • "ip.geoip.country"
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 id field is also required.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.