API keys
API keys are used to interact with our Video API. They are not assigned to a particular user (though of course a user does initially create one).
You will need to create the first (perhaps only) API key using our dashboard (since you need to make an authenticated request to get an API key: for the first one, you use your email and password to authenticate).
You can manage API keys by making the following requests:
GET /keys
Example request
curl \
-H "Authorization: Bearer YOUR-API-KEY" \
"https://api.vidbeo.com/v2/keys"
Example response
{
"success": true,
"result": [
{
"id": "abcde12345abcde12345a",
"name": "Example key",
"type": "api",
"permissions": [],
"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
Name | Type | Default | Information |
---|---|---|---|
limit | String | 25 | Maximum number to return |
cursor | String | "" | Used to get the next page of results: if applicable we return this as part of the links.next URL |
GET /keys/:id
Example request
curl \
-H "Authorization: Bearer YOUR-API-KEY" \
"https://api.vidbeo.com/v2/keys/abcde12345abcde12345a"
Example response
{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"name": "Example key",
"type": "api",
"permissions": [],
"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
Key | Type | Description |
---|---|---|
id | String | The unique identifier given to this key |
name | String | The name given to this key |
type | String | The type of key |
permissions | Array | What actions should this key be limited to. We currently support [] for read-write and ["fetch"] for read-only |
created_by | String | The ID of the user who created it (if known) |
created_time | String | The date and time it was created |
updated_by | String | The ID of the user who last modified it (if known) |
updated_time | String | The date and time it was last modified |
PATCH /keys/:id
The body of the request should contain one, or more, attributes that you would like to update for the key.
Example request
curl \
-g \
-H "Authorization: Bearer YOUR-API-KEY" \
-H "Content-Type: application/json" \
-X PATCH \
-d '{"name":"New name"}' \
"https://api.vidbeo.com/v2/keys/abcde12345abcde12345a"
Example response
{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"name": "New name",
"type": "api",
"permissions": [],
"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": []
}
DELETE /keys/:id
Example request
curl \
-H "Authorization: Bearer YOUR-API-KEY" \
-X DELETE \
"https://api.vidbeo.com/v2/keys/abcde12345abcde12345a"
Example response
{
"success": true,
"result": {},
"links": null,
"errors": []
}
POST /keys
Note the addition of the value
field in this response. That is only revealed once, here, so please make a note of it.
Example request
curl \
-g \
-H "Authorization: Bearer YOUR-API-KEY" \
-H "Content-Type: application/json" \
-X POST \
-d '{"type":"api", "name": "Example", "permissions": []}' \
"https://api.vidbeo.com/v2/keys"
Example response
{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"name": "Example",
"type": "api",
"permissions": [],
"value": "THE-NEW-API-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 provide a type
(we currently only support "api"), a short name
to describe it, and a value for permissions
. For that value for permissions we currently support either []
to make a read/write key or ['fetch']
to make a read-only key.
Key | Type | Description |
---|---|---|
type | String | The type of key (we currently only support "api") |
name | String | A short name for the key (1-50 characters) |
permissions | Array | The actions this key is restricted to. We currently support [] for read/write or ["fetch"] for read-only |