Update destination RTMP ingest
PUT
https://octopus.livepush.io/streams/{stream_id}/destinations/{destination_id}/rtmp
Base URL https://octopus.livepush.io — Core Streams & Media APIs
Replaces a destination's RTMP ingest URL and stream key, keeping its other settings. Use it to point one custom RTMP destination at a new platform event before each broadcast.
The change is applied to the stream's live configuration right away, so a broadcast running on this destination moves to the new ingest. Change it between broadcasts.
Requires a token with the streams.destinations.write scope.
Authorization
Send a valid access token in the Authorization header.
bearerAuth— Bearer token (JWT)
Authorization: Bearer YOUR_API_TOKEN
Try it
Loading the request builder…
PUT
https://octopus.livepush.io/streams/{stream_id}/destinations/{destination_id}/rtmp
— This call changes live data on your account.
Parameters
Path parameters
-
stream_idstring requiredUnique identifier of the live stream -
destination_idstring requiredUnique identifier of the destination
Request body
-
rtmpBasestring requiredBase RTMP ingest URL -
rtmpKeystring requiredRTMP stream key
{
"rtmpBase": "rtmp://a.rtmp.youtube.com/live2",
"rtmpKey": "xxxx-xxxx-xxxx-xxxx"
}
Code samples
curl -X PUT 'https://octopus.livepush.io/streams/<stream_id>/destinations/<destination_id>/rtmp' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"rtmpBase": "rtmp://a.rtmp.youtube.com/live2",
"rtmpKey": "xxxx-xxxx-xxxx-xxxx"
}'
const response = await fetch('https://octopus.livepush.io/streams/<stream_id>/destinations/<destination_id>/rtmp', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"rtmpBase": "rtmp://a.rtmp.youtube.com/live2",
"rtmpKey": "xxxx-xxxx-xxxx-xxxx"
}),
});
if (!response.ok) {
throw new Error(`Livepush API error ${response.status}`);
}
const data = await response.json();
import requests
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
}
payload = {
"rtmpBase": "rtmp://a.rtmp.youtube.com/live2",
"rtmpKey": "xxxx-xxxx-xxxx-xxxx"
}
response = requests.put('https://octopus.livepush.io/streams/<stream_id>/destinations/<destination_id>/rtmp', headers=headers, json=payload, timeout=30)
response.raise_for_status()
data = response.json()
Responses
Ingest updated
-
successboolean
{
"success": true
}
Unauthorized