Skip to main content

Authorization

All Cloud Video Kit API methods require authentication with API key (read more: API keys guide) or Bearer token obtained by OAuth flow. In this article, we will walk you through the necessary steps to perform the API call.

Prerequisites

In order to perform successful call to Cloud Video Kit API, you are going to need:

Tenant Name

Tenant name is used in URL of every API request. You can get it from the left side of Cloud Video Kit console:

Tenant Name Screen

You may notice already prepared endpoints for your tenant, on the right side of </API> cheatsheet section:

API Endpoints Cheatsheet

Tenant ID

Tenant ID is used in every API request as X-Tenant-Id header. You can find it below tenant name in Cloud Video Kit console:

Tenant ID Screen

API Key

API key is used in every API request as X-Api-Key header. You can find it on the left side of </API> cheatsheet section:

OAuth Credentials


API Request Example

Let's perform sample request to Cloud Video Kit API. We are going to make Get Channel Status request.

Get Channel Status

Returns status info about a channel.

Specifics

Method URLhttps://{tenant_name}.api.videokit.cloud/live/v1/channels/{id}/status
HTTP methodGET

Request headers

HeaderRequiredValue
Content-TypeYesapplication/json
X-Api-KeyYes{your_api_key}
X-Tenant-IdYesTenant ID

Request body

ParameterRequiredTypeNotes
idYesstringChannel Id (path parameter)
REQUEST
curl -X GET \
https://{tenant_name}.api.videokit.cloud/live/v1/channels/12345678-1234-1234-1234-123456789abc/status \
-H 'Content-Type: application/json' \
-H 'X-Api-Key: {your_api_key}' \
-H 'X-Tenant-Id: String^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-4-[0-9a-f]{12}$'

Request example in Postman

Get Channel Status Example


Use OAuth flow to get access_token (legacy)

note

This type of authorization may not be available for your tenant. In order to perform API calls, please use API key instead.

Get credentials from Cloud Video Kit

1) Start by entering Cloud Video Kit console and head to </API> section:

CVK API directions

2) Copy Client ID and Client Secret from API cheatsheet page:

OAuth Credentials

Make API call to obtain access_token

Proceed with your credentials and perform API call to OAuth endpoint.

Specifics

Method URLhttps://auth.videokit.cloud/oauth/token
HTTP methodPOST

Request headers

HeaderRequiredValue
Content-TypeYesapplication/x-www-form-urlencoded

Request body

ParameterRequiredTypeNotes
client_idYesstringClient ID
client_secretYesstringClient Secret
grant_typeYesstringGrant type. Possible values: client_credentials
REQUEST EXAMPLE
curl -L -X POST 'https://auth.videokit.cloud/oauth/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'client_id=Dxxxxxxxxxxxxxxxxxxxxxxx_xxxxx' \
-d 'client_secret=Jxxxxxxx-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxx' \
-d 'grant_type=client_credentials'

Access Token Postman

Response

FieldDescription
access_tokenOAuth token
scopeList of all permissions the token allows
expires_inTime in seconds until token expiration. Default: 86400 (1 day)
token_typeAlways "Bearer"
RESPONSE EXAMPLE
{
"access_token": "8QnDxxxxxxxxxxxxsxxxxxxxxxxxxxxxxxxxxxxxxxxxxnEVEwu0Oa2J",
"scope": "cvr:e7xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx71 live:e7xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx71 transcoder:e7xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx71 drm:e7xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx71 vod:e7xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx71 kms:e7xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx71 core:e7xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx71 streaming:e7xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx71 cap:e7xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx71",
"expires_in": 86400,
"token_type": "Bearer"
}

Contact us

If you encounter issues performing API calls, check our Error codes page or contact us.