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:
You may notice already prepared endpoints for your tenant, on the right side of </API>
cheatsheet section:
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:
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:
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 URL | https://{tenant_name}.api.videokit.cloud/live/v1/channels/{id}/status |
HTTP method | GET |
Request headers
Header | Required | Value |
---|---|---|
Content-Type | Yes | application/json |
X-Api-Key | Yes | {your_api_key} |
X-Tenant-Id | Yes | Tenant ID |
Request body
Parameter | Required | Type | Notes |
---|---|---|---|
id | Yes | string | Channel Id (path parameter) |
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
Use OAuth flow to get access_token (legacy)
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:
2) Copy Client ID and Client Secret from API cheatsheet page:
Make API call to obtain access_token
Proceed with your credentials and perform API call to OAuth endpoint.
Specifics
Method URL | https://auth.videokit.cloud/oauth/token |
HTTP method | POST |
Request headers
Header | Required | Value |
---|---|---|
Content-Type | Yes | application/x-www-form-urlencoded |
Request body
Parameter | Required | Type | Notes |
---|---|---|---|
client_id | Yes | string | Client ID |
client_secret | Yes | string | Client Secret |
grant_type | Yes | string | Grant type. Possible values: client_credentials |
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'
Response
Field | Description |
---|---|
access_token | OAuth token |
scope | List of all permissions the token allows |
expires_in | Time in seconds until token expiration. Default: 86400 (1 day) |
token_type | Always "Bearer" |
{
"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.