Update IP Access
Update RTMPAuth of push stream
curl -X POST "https://api.5centscdn.com/v2/streams/push/1001/rtmpauth" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"enabled": "Y",
"username": "admin",
"password": "password"
}'
import requests
import json
url = "https://api.5centscdn.com/v2/streams/push/1001/rtmpauth"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"enabled": "Y",
"username": "admin",
"password": "password"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/streams/push/1001/rtmpauth", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"enabled": "Y",
"username": "admin",
"password": "password"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"enabled": "Y",
"username": "admin",
"password": "password"
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/streams/push/1001/rtmpauth", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.5centscdn.com/v2/streams/push/1001/rtmpauth')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"enabled": "Y",
"username": "admin",
"password": "password"
}'
response = http.request(request)
puts response.body
{
"result": "success",
"message": "Stream Updated",
"stream": {
"type": "push",
"id": 51605,
"serviceid": 103,
"name": "kola/deloa",
"codec": "h264",
"protocols": [
[
"HLS"
],
[
"HLS"
]
],
"parentid": null,
"server": "201",
"backup": "",
"draft": "0",
"disabled": "0",
"created_at": "2024-12-30 02:57:15",
"updated_at": "2024-12-30 03:36:27",
"lastseen_at": false,
"deleted": null,
"protocolsLock": 1,
"status": "Deploying",
"has": {
"rtmp": 0,
"rtsp": 0,
"hls": 1,
"dash": 0,
"rtmpauth": true
},
"fms": {
"server": {
"country": "Oceania",
"meta": {
"fmsUrl": "rtmp://fms-01-01.5centscdn.com"
}
}
},
"parts": {
"pp": "kola",
"sn": "deloa",
"full": "koladeloa"
},
"restream": {},
"playbackurls": {
"scheme": "http",
"url_prefix": "http://onetwo.5centscdndemo.ca",
"rtmp": "rtmp://rtmp.5centscdn.com:1935/",
"rtsp": "rtsp://rtsp.5centscdn.com:554/",
"hlsManifest": "playlist_dvr.m3u8",
"dashManifest": "manifest_dvr.mpd",
"hls": "https://hash-hls-live.5centscdn.com",
"dash": "https://hash-hls-live.5centscdn.com",
"players": {
"flowplayer": {
"baseQ": "",
"base": "https://cdn.example.com/flowplayer/hls/",
"hls": "https://hash-hls-live.5centscdn.com"
},
"videojs": {
"baseQ": "",
"base": "https://cdn.example.com/videojs/hls/",
"hls": "https://hash-hls-live.5centscdn.com"
},
"own": {
"hashes": {
"hash": "4vwupwi1g6ecej9r",
"hls": "https://hash-hls-live.5centscdn.com",
"dash": "https://hash-hls-live.5centscdn.com",
"base64": "aHR0cDovL2V4YW1wbGUuY29tL3BsYXlsaXN0Lm0zdTg=",
"base64dash": "aHR0cDovL2V4YW1wbGUuY29tL21hbmlmZXN0Lm1wZA=="
},
"baseQ": "?showcv=true&title=kola/deloa",
"base": "https://cdn.example.com/player/hls/skin1/example",
"hls": "https://hash-hls-live.5centscdn.com",
"dash": "https://hash-hls-live.5centscdn.com"
}
}
},
"platformsCount": 1,
"ssl_enabled": false,
"hash": "fa7d3f6b626222cd40d75e09ec026da1.sdp",
"ndvr": {
"enabled": "Y",
"retention": "33"
},
"securetoken": {
"enabled": "Y",
"policy": "F",
"keyip": "Y",
"list": "",
"timeout": 3600,
"session": "0",
"ips": "1.1.1.1,2.2.2.2",
"dirs": null,
"active": "N"
},
"record": {
"enabled": "Y",
"retention": "14",
"stream": null
},
"domainlock": {
"enabled": "Y",
"policy": "N",
"list": "",
"ips": "1.1.1.1,2.2.2.2",
"noreferer": "Y",
"active": "Y"
},
"geoblock": {
"enabled": "Y",
"policy": "N",
"list": [
"GB",
"US"
],
"ips": "1.1.1.1,2.2.2.2",
"active": "Y"
},
"ipaccess": {
"enabled": "Y",
"policy": "Y",
"list": "8.8.8.8,9.9.9.9",
"ips": "1.1.1.1",
"active": "Y"
},
"useragent": {
"enabled": "Y",
"policy": "Y",
"list": "Array",
"ips": "1.1.1.1",
"casesensitive": "Y",
"active": "Y",
"listArr": [
"Mozilla/5.0",
"Chrome/91.0"
]
},
"rtmpauth": {
"password": "passsword",
"active": "N"
},
"transcode": {
"id": 51605,
"type": "mixed",
"ltc": 2,
"vprofiles": [
"12345",
"12345"
],
"aprofiles": [
"12345"
],
"filters": [
"3",
"4"
],
"disabled": "0",
"warnings": [
"'source' profile cannot be enabled when filters are active."
],
"enabled": true,
"count": 2,
"countRaw": 2,
"codec": null,
"profiles": {
"count": {
"total": 0
}
},
"isEditable": true
},
"platforms": [
{
"id": 42086,
"relid": 51605,
"name": "Custom RTMP",
"rtmp": "rtmp://rtmp.5centscdn.com:1935/",
"key": "password",
"auth": "Y",
"username": "admin",
"password": "password",
"schedule": "instant",
"scheduletime": null,
"length": "00:00",
"platform_id": 1,
"provider_id": 0,
"video_id": "",
"disabled": "0",
"transcode": {
"type": "sd",
"enabled": false,
"isEditable": true
}
}
]
}
}
POST
/streams/push/{streamid}/rtmpauthPOST
Base URLstring
Target server for requests. Edit to use your own host.
API Key (header: X-API-Key)
X-API-Keystring
RequiredAPI key (sent in header)
path
streamidstring
RequiredStream ID
Content-Typestring
RequiredThe media type of the request body
Options: application/json
enabledstring
Enable or disable this feature. Y means enabled, N means disabled.
usernamestring
Username for authentication.
passwordstring
Password for authentication.
Request Preview
Response
Response will appear here after sending the request
Authentication
header
X-API-Keystring
RequiredAPI Key for authentication. Provide your API key in the header.
Path Parameters
Body
application/json
Responses
resultstring
Status of the API response.
messagestring
Human-readable message describing the result.
streamobject
Stream object containing configuration and status details.
Was this page helpful?