Generate a provider token

post

/content/published/api/v1.1/items/{id}/providerTokens

for a published asset.

Request

Supported Media Types
Path Parameters
Query Parameters
Header Parameters
Body ()
Model class for generating provider token requests
Root Schema : ProviderToken
Type: object
ProviderToken
Show Source
Nested Schema : permissions
Type: array
permissions with which a token is to be generated; valid permissions are: view, download, contribute, and manage
Show Source
Nested Schema : Provider
Type: object
Provider
Show Source
Nested Schema : scope
Type: object
Additional Properties Allowed
Show Source
provider specific properties to future identify a target for which a token is to be generated
Nested Schema : additionalProperties
Type: object
Back to Top

Response

Supported Media Types

200 Response

Successful operation.
Body ()
Root Schema : ProviderToken
Type: object
ProviderToken
Show Source
Nested Schema : permissions
Type: array
permissions with which a token is to be generated; valid permissions are: view, download, contribute, and manage
Show Source
Nested Schema : Provider
Type: object
Provider
Show Source
Nested Schema : scope
Type: object
Additional Properties Allowed
Show Source
provider specific properties to future identify a target for which a token is to be generated
Nested Schema : additionalProperties
Type: object

400 Response

Bad Request. The server is unable to process the request on the client side due to malformed syntax, invalid data or message framing.

403 Response

Forbidden. Client is not authorized to perform this request.

404 Response

The requested resource was not found.

500 Response

Internal server error. An unexpected error condition encountered in the system.
Back to Top

Examples

The following example shows how to create a provider token for a published asset.

curl -i -X POST -H 'Content-Type:application/json' -H 'X-Requested-With: XMLHttpRequest' 'http://<hostname>/content/published/api/v1.1/items/{id}/providerTokens'
Example 1

This generates a kaltura provider preview token for a published asset with id CONTB94719ABE603404BAE0D808C59989FF9.

/content/published/api/v1.1/items/CONTB94719ABE603404BAE0D808C59989FF9/providerTokens?channelToken=d20844efa0d143f8b343e0aaeb4d2caf

Request Payload

{
  "provider": {
    "name": "kaltura"
  },
  "scope": {
    "entry": {
      "id": "0_8t3brdui"
    }
  }
}      

Request Headers

{
  "Content-Type": "application/json",
  "X-Requested-With": "XMLHttpRequest"
}

Response Body

{
  "provider": {
    "name": "kaltura"
  },
  "permissions": [
    "view"
  ],
  "token": "djJ8MjcwNTc3MnyrFUVElvYu5GMYZJQOUMjTloB-oN2EbZ325YuunBinE4XNsCgY4H5p5-oZ-qES7OSUWBljkVrKIX6lZ9qwc3VVmkvo0WlExGHOaxEdhIlB_iwZrBqoTaGD8RE2y-6uKMjRBdB5XI23fa7FuB6vH2g0"
}
Back to Top