JWT keys

JWT keys

If you have a video whose privacy is set as authenticated then a valid cookie or JSON Web Token (JWT) is required to be sent along with the request for its landing page, embed code or HLS manifest.

Please see our guide on making a public and private key, along with the expected structure of the JWT: How do I use a JWT to authenticate private videos.

Manage your JWT keys by making the following requests:

Return the details of all your JWT keys
GET /jwt_keys

Example request

curl \
-H "Authorization: Bearer YOUR-API-KEY" \
"https://api.vidbeo.com/v2/jwt_keys"

Example response

{
"success": true,
"result": [
{
"id": "abcde12345abcde12345a",
"name": "Example key",
"public_key": "-----BEGIN PUBLIC KEY-----...",
"created_by": "abcde12345abcde12345a",
"created_time": "2021-01-01T12:00:00.000Z",
"updated_by": "abcde12345abcde12345a",
"updated_time": "2021-01-01T12:00:00.000Z"
},
...
],
"links": {},
"errors": []
}

Optional parameters

NameTypeDefaultInformation
limitString25Maximum number to return
cursorString""Used to get the next page of results: if applicable we return this as part of the links.next URL
Return the details of a JWT key
GET /jwt_keys/:id

Example request

curl \
-H "Authorization: Bearer YOUR-API-KEY" \
"https://api.vidbeo.com/v2/jwt_keys/abcde12345abcde12345a"

Example response

{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"name": "Example key",
"public_key": "-----BEGIN PUBLIC KEY-----...",
"created_by": "abcde12345abcde1234a",
"created_time": "2022-01-01T00:00:00.000Z",
"updated_by": "abcde12345abcde12345a",
"updated_time": "2022-01-01T00:00:00.000Z"
},
"links": null,
"errors": []
}

Response format

KeyTypeDescription
idStringThe unique identifier given to this JWT key
nameStringThe name given to this JWT key
public_keyStringThe public half of the private/public key-pair you create: the certificate used to verify the JWT
created_byStringThe ID of the user who created it (if known)
created_timeStringThe date and time it was created
updated_byStringThe ID of the user who last modified it (if known)
updated_timeStringThe date and time it was last modified
Delete a JWT key
DELETE /jwt_keys/:id

Example request

curl \
-H "Authorization: Bearer YOUR-API-KEY" \
-X DELETE \
"https://api.vidbeo.com/v2/jwt_keys/abcde12345abcde12345a"

Example response

{
"success": true,
"result": {},
"links": null,
"errors": []
}
Create a JWT key
POST /jwt_keys

Example request

curl \
-g \
-H "Authorization: Bearer YOUR-API-KEY" \
-H "Content-Type: application/json" \
-X POST \
-d '{"name":"New key", "public_key": "----- BEGIN PUBLIC KEY -----\nMIIII..."}' \
"https://api.vidbeo.com/v2/jwt_keys"

Example response

{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"name": "New key",
"public_key": "-----BEGIN PUBLIC KEY-----...",
"created_by": "abcde12345abcde1234a",
"created_time": "2022-01-01T00:00:00.000Z",
"updated_by": "abcde12345abcde12345a",
"updated_time": "2022-01-01T00:00:00.000Z"
},
"links": null,
"errors": []
}

Required parameters

You need to give the new JWT key a name and send its public_key.

KeyTypeDescription
nameStringA name for the JWT key (1-50 characters)
public_keyStringThe public half of your private/public key pair