Stream keys
NOTE
Live streaming currently requires an Enterprise account.
Your live streaming application (such as OBS or FFMPEG) will ask you for a stream URL/key. Most accounts will only have one however if you need concurrent live streams and your package includes that ability, you will of course need multiple stream keys.
Note: Treat the value of rtmps_key
like a password. Anyone who knows that secret key can stream to your account!
GET /stream_keys
Example request
curl \
-H "Authorization: Bearer YOUR-API-KEY" \
"https://api.vidbeo.com/v2/stream_keys"
Example response
{
"success": true,
"result": [
{
"id": "abcde12345abcde12345a",
"rtmps_url": "rtmps://an.example.com:443/example/",
"rtmps_key": "anExampleKey",
"reconnect_window": 30,
"stream": "abcde12345abcde12345a",
"event": "abcde12345abcde12345a",
"archive": true,
"status": "ready",
"created_by": "abcde12345abcde12345a",
"created_time": "2022-01-01T00:00:00.000Z",
"updated_by": "abcde12345abcde12345a",
"updated_time": "2022-01-01T00:00:00.000Z"
}
],
"links": {},
"errors": []
}
Optional parameters (query string)
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 /stream_keys/:id
Example request
curl \
-H "Authorization: Bearer YOUR-API-KEY" \
"https://api.vidbeo.com/v2/stream_keys/abcde12345abcde12345a"
Example response
{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"rtmps_url": "rtmps://an.example.com:443/example/",
"rtmps_key": "anExampleKey",
"reconnect_window": 30,
"stream": "abcde12345abcde12345a",
"event": "abcde12345abcde12345a",
"archive": true,
"status": "ready",
"created_by": "abcde12345abcde12345a",
"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 assigned to it |
rtmps_url | String | Your streaming application will ask for this |
rtmps_key | String | Your streaming application will ask for this |
reconnect_window | Int | The number of seconds to wait before assuming the stream has ended |
stream | String | The ID of the video (of type stream), used while live |
event | String | The ID of the video (of type event) which will become a vod when the stream ends |
archive | Boolean | Whether to convert videos generated by the stream into a vod, or discard them |
status | String | Its status (set by the system) |
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 /stream_keys/:id
The body of the request should contain the attributes that you would like to update. Most can only be updated by the system as they are used internally or are read-only:
Key | Type | Description |
---|---|---|
archive | Boolean | Whether to convert the generated event into a vod, or discard it |
reconnect_window | Int | The number of seconds to wait before assuming the stream has ended (0-90) |
Example request
curl \
-g \
-H "Authorization: Bearer YOUR-API-KEY" \
-H "Content-Type: application/json" \
-X PATCH \
-d '{"reconnect_window":20}' \
"https://api.vidbeo.com/v2/stream_keys/abcde12345abcde12345a"
Example response
{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"rtmps_url": "rtmps://an.example.com:443/example/",
"rtmps_key": "anExampleKey",
"reconnect_window": 20,
"stream": "abcde12345abcde12345a",
"event": "abcde12345abcde12345a",
"archive": true,
"status": "ready",
"created_by": "abcde12345abcde12345a",
"created_time": "2022-01-01T00:00:00.000Z",
"updated_by": "abcde12345abcde12345a",
"updated_time": "2022-01-01T00:00:00.000Z"
},
"links": null,
"errors": []
}
DELETE /stream_keys/:id
It is not possible to delete a stream key directly. One is deleted for you by our system when you delete a live stream.
POST /stream_keys
It is not possible to create a stream key directly. One is created for you by our system when you create a live stream.