Update Secure Token
Update secure token of a push stream
curl -X POST "https://api.5centscdn.com/v2/streams/push/1001/securetoken" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"enabled": "Y",
"policy": "D",
"list": "9fd379c72062e891",
"timeout": 3600,
"session": "0",
"keyip": false,
"ips": "",
"mode": "save"
}'
import requests
import json
url = "https://api.5centscdn.com/v2/streams/push/1001/securetoken"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"enabled": "Y",
"policy": "D",
"list": "9fd379c72062e891",
"timeout": 3600,
"session": "0",
"keyip": false,
"ips": "",
"mode": "save"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/streams/push/1001/securetoken", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"enabled": "Y",
"policy": "D",
"list": "9fd379c72062e891",
"timeout": 3600,
"session": "0",
"keyip": false,
"ips": "",
"mode": "save"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"enabled": "Y",
"policy": "D",
"list": "9fd379c72062e891",
"timeout": 3600,
"session": "0",
"keyip": false,
"ips": "",
"mode": "save"
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/streams/push/1001/securetoken", 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/securetoken')
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",
"policy": "D",
"list": "9fd379c72062e891",
"timeout": 3600,
"session": "0",
"keyip": false,
"ips": "",
"mode": "save"
}'
response = http.request(request)
puts response.body
{
"result": "success",
"message": "Stream Updated",
"stream": {
"monitoring_id": null,
"type": "push",
"id": "monitor-12345",
"serviceid": 103,
"name": "sample/stream",
"codec": "h264",
"ingests": [
[],
null
],
"protocols": [
[
"HLS"
],
[
"HLS"
]
],
"parentid": null,
"server": "201",
"backup": "",
"dedicatedLTC": "0",
"hasAdvancedFeatures": "0",
"monitoring_triggers": null,
"draft": "0",
"disabled": "0",
"created_at": "2026-04-30 07:12:35",
"updated_at": "2026-04-30 08:27:51",
"lastseen_at": false,
"deleted": null,
"ingestsLock": 0,
"protocolsLock": 1,
"status": "Deploying",
"has": {
"rtmp": 0,
"rtsp": 0,
"hls": 1,
"dash": 0,
"rtmpauth": false
},
"fms": {
"server": {
"country": "North America",
"meta": {
"fmsUrl": "rtmp://fms-01-01.5centscdn.com"
}
}
},
"parts": {
"pp": "test",
"sn": "stream",
"full": "samplestream"
},
"restream": {},
"playbackurls": {
"scheme": "https",
"url_prefix": "https://stream-abc12-hls-live.stream.example.com",
"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://cdn.example.com/flowplayer/hls/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4"
},
"videojs": {
"baseQ": "",
"base": "https://cdn.example.com/videojs/hls/",
"hls": "https://cdn.example.com/videojs/hls/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4"
},
"own": {
"hashes": {
"stream-abc12-hls-live.stream.example.com": {
"hash": "jkl78hash",
"hls": "https://hash-hls-live.5centscdn.com",
"base64": "aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4",
"dash": "https://hash-hls-live.5centscdn.com",
"base64dash": "aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4"
}
},
"baseQ": "?showcv=true&title=sample/stream",
"base": "https://cdn.example.com/player/hls/skin1/jkl78hash/",
"hls": "https://cdn.example.com/player/hls/skin1/jkl78hash/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=sample/stream",
"dash": "https://cdn.example.com/player/dash/skin1/jkl78hash/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=sample/stream"
}
},
"tokenized": {
"scheme": "https",
"url_prefix": "https://stream-abc12-hls-live.stream.example.com",
"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": {
"hostname": "cdn.example.com",
"flowplayer": {
"baseQ": "",
"base": "https://cdn.example.com/flowplayer/hls/",
"hls": "https://cdn.example.com/flowplayer/hls/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4",
"dash": "https://cdn.example.com/flowplayer/dash/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4"
},
"videojs": {
"baseQ": "",
"base": "https://cdn.example.com/videojs/hls/",
"hls": "https://cdn.example.com/videojs/hls/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4",
"dash": "https://cdn.example.com/videojs/dash/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4"
},
"own": {
"hashes": {
"stream-abc12-hls-live.stream.example.com": {
"hash": "jkl78hash",
"hls": "https://hash-hls-live.5centscdn.com",
"base64": "aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4",
"dash": "https://hash-hls-live.5centscdn.com",
"base64dash": "aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4"
}
},
"baseQ": "?showcv=true&title=sample/stream",
"base": "https://cdn.example.com/player/hls/skin1/jkl78hash/",
"hls": "https://cdn.example.com/player/hls/skin1/jkl78hash/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=sample/stream",
"dash": "https://cdn.example.com/player/dash/skin1/jkl78hash/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=sample/stream"
}
},
"path": {
"hls": "/test/a4c1f924c3f3377575755f900a6ea602.sdp/playlist_dvr.m3u8",
"dash": "/test/a4c1f924c3f3377575755f900a6ea602.sdp/manifest_dvr.mpd"
},
"token": {
"hls": "md5=V4ZzWdPkvqz-9s4ZGarjHw&path=%2Ftest%2Fa4c1f924c3f3377575755f900a6ea602.sdp&expires=1777541271",
"dash": "md5=V4ZzWdPkvqz-9s4ZGarjHw&path=%2Ftest%2Fa4c1f924c3f3377575755f900a6ea602.sdp&expires=1777541271"
}
}
},
"platformsCount": 0,
"ssl_enabled": true,
"hash": "a4c1f924c3f3377575755f900a6ea602.sdp",
"ndvr": {
"enabled": "Y",
"retention": "5"
},
"securetoken": {
"enabled": "Y",
"policy": "D",
"keyip": "N",
"list": "9fd379c72062e891",
"timeout": 3600,
"session": "0",
"ips": "",
"dirs": null,
"active": "Y"
},
"record": {
"enabled": "N",
"retention": "3",
"stream": {
"id": 72200,
"type": "record"
}
},
"domainlock": {
"enabled": "Y",
"policy": "Y",
"list": "example.com,docs.example.com",
"ips": "",
"noreferer": "N",
"active": "Y"
},
"geoblock": {
"enabled": "Y",
"policy": "N",
"list": [
"AU"
],
"ips": "",
"active": "Y"
},
"ipaccess": {
"enabled": "Y",
"policy": "N",
"list": "",
"ips": "",
"active": "N"
},
"useragent": {
"enabled": "Y",
"policy": "Y",
"list": "",
"ips": "",
"casesensitive": "N",
"active": "N",
"listArr": [
""
]
},
"rtmpauth": {
"password": "",
"active": "N"
},
"transcode": {
"ltc": 0,
"type": "mixed",
"enabled": false,
"isEditable": true
},
"platforms": [],
"messages": {},
"adInsertion": null
}
}
/streams/push/{streamid}/securetokenTarget server for requests. Edit to use your own host.
API key (sent in header)
Stream ID
The media type of the request body
Enable or disable this feature. Y means enabled, N means disabled.
Secure token path policy. F means Full Path (secure full path using token), Q means Partial Path (secure partial path using token in query), D means Partial Path (secure partial path using token in path). Allowed values: F, Q, D.
The generated secure token used to sign and validate protected URLs.
Token or session expiry time in seconds.
Session type. 1 means moving session (URL is valid when requested within Token Expiration time and subsequent request is made within the Token Expiration time), 0 means fixed session (URL is valid till Token Expiration).
Bind the secure token to the requester IP address. true means enabled, false means disabled.
Comma-separated IP addresses for access control. Leave empty for none.
Operation mode for this request. Common values: save, delete, clear, replace.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Path Parameters
Body
Secure token path policy. F means Full Path (secure full path using token), Q means Partial Path (secure partial path using token in query), D means Partial Path (secure partial path using token in path). Allowed values: F, Q, D.
DThe generated secure token used to sign and validate protected URLs.
9fd379c72062e891Session type. 1 means moving session (URL is valid when requested within Token Expiration time and subsequent request is made within the Token Expiration time), 0 means fixed session (URL is valid till Token Expiration).
0Bind the secure token to the requester IP address. true means enabled, false means disabled.
falseResponses
Status of the API response.
Human-readable message describing the result.
Stream object containing configuration and status details.