Skip to main content
Skip table of contents

Getting playout URL and tokens

Overview

When the client application needs to play out a channel or content, it needs to:

  1. Make a call to URL Builder to get:

    1. The cdnType, which indicates whether a CDN token is required, and if so, which CDN is used for the content/channel
      (Some deployments use multiple CDNs, so the client needs to know which one it is dealing with.)

    2. The playout URL

    3. The content auth token (plus any other required tokens, for example, for watermarking)

    This is explained below.

  2. The client must construct the playout request using the playout URL and the tokens it received from URL Builder according to the requirements of the CDN that is being used to deliver the channel/content.
    Different CDNs expect the request in different formats:

    • Some (such as Broadpeak) expect the CDN token to be a URL query parameter.

    • Some (such as Cloudfront) expect the token to be passed as a request header.

Once the client has made the playout request and received the content manifest, it must request the licence to be able to decode and play back the content.

Request

To get the playout URL and required tokens, send a GET request to:

CODE
https://<host>:<port>/urlbuilder/v1/playout/content/token

Headers

  • authorization – bearer token that the client received at signon

  • nv-tenant-id – the tenant ID

Mandatory arguments

All the following mandatory arguments are query parameters:

  • content_id – the ID of the content

  • type – either account or device 

  • content_URL – the content URL (from the content's metadata as provided by MDS)

Note that the ip field has been deprecated and is no longer required.

Other arguments

None

Response

A successful request returns an HTTP 200 status.

A bad request returns an HTTP 400 status.

An unauthorised request returns an HTTP 401 status.

If the specified content does not exist, the request returns an HTTP 404 status.

Example

A successful request will return a response in the following form:

CODE
{
  "contentAuthToken": {
    "content_token": {},
    "token_type": "Bearer",
    "expires_in": 3887999,
    "access_token": {},
    "refresh_token": {}
  },
  "cdnAccessToken": {},
  "cdnWmToken": "string",
  "cdnType": "string",
  "playbackUrl": "string"
}

See also

For full details of this API, see the URL Builder API documentation.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.