SecurityUpdate Secure Token

Update Secure Token

Update secure token of a delayed stream

curl -X POST "https://api.5centscdn.com/v2/streams/timeshift/1001/securetoken" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "enabled": "Y",
  "policy": "D",
  "list": "aaa0efb4415b78b4",
  "timeout": 3600,
  "session": "0",
  "keyip": false,
  "ips": "",
  "mode": "save"
}'
{
  "result": "success",
  "message": "Stream Updated",
  "stream": {
    "monitoring_id": null,
    "type": "timeshift",
    "id": 72358,
    "serviceid": 103,
    "name": "5cc_ts/testt_test",
    "codec": "h264",
    "ingests": [
      [],
      null
    ],
    "protocols": [
      [
        "HLS"
      ],
      [
        "HLS"
      ]
    ],
    "parentid": 59180,
    "server": "1",
    "backup": "",
    "dedicatedLTC": "0",
    "hasAdvancedFeatures": "0",
    "monitoring_triggers": null,
    "draft": "0",
    "disabled": "0",
    "created_at": "2026-05-04 06:31:34",
    "updated_at": "2026-05-04 06:50:23",
    "lastseen_at": false,
    "deleted": null,
    "ingestsLock": 0,
    "protocolsLock": 1,
    "status": "Deploying",
    "has": {
      "rtmp": 0,
      "rtsp": 0,
      "hls": 1,
      "dash": 0,
      "rtmpauth": false
    },
    "parts": {
      "pp": "5cc_ts",
      "sn": "testt_test",
      "full": "5cc_tstestt_test"
    },
    "parent": {
      "id": 59180,
      "name": "5cc/testt",
      "codec": "h264",
      "stype": "push",
      "rtmpauth": "N"
    },
    "restream": {},
    "timeshift": {
      "shift": 2859,
      "type": "stream"
    },
    "playbackurls": {
      "scheme": "https",
      "url_prefix": "https://stream-abc12-hls-live.stream.example.com",
      "rtmp": "",
      "rtsp": "",
      "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",
          "rtmp": "",
          "rtsp": ""
        },
        "videojs": {
          "baseQ": "",
          "base": "https://cdn.example.com/videojs/hls/",
          "hls": "https://cdn.example.com/videojs/hls/aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4",
          "rtmp": "",
          "rtsp": ""
        },
        "own": {
          "baseQ": "?showcv=true&title=5cc_ts/testt_test",
          "base": "https://cdn.example.com/player/hls/skin1//",
          "hls": "https://cdn.example.com/player/hls/skin1//aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=5cc_ts/testt_test",
          "dash": "https://cdn.example.com/player/dash/skin1//aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=5cc_ts/testt_test"
        }
      },
      "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": {
            "baseQ": "?showcv=true&title=5cc_ts/testt_test",
            "base": "https://cdn.example.com/player/hls/skin1//",
            "hls": "https://cdn.example.com/player/hls/skin1//aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=5cc_ts/testt_test",
            "dash": "https://cdn.example.com/player/dash/skin1//aHR0cHM6Ly9zdHJlYW0uZXhhbXBsZS5jb20vc2FtcGxlL3N0cmVhbS9wbGF5bGlzdC5tM3U4?showcv=true&title=5cc_ts/testt_test"
          }
        },
        "path": {
          "hls": "/5cc_ts/testt_test/playlist_dvr.m3u8",
          "dash": "/5cc_ts/testt_test/manifest_dvr.mpd"
        },
        "token": {
          "hls": "md5=da5eudmbLge8unBJbV4upA&path=%2F5cc_ts%2Ftestt_test&expires=1777881023",
          "dash": "md5=da5eudmbLge8unBJbV4upA&path=%2F5cc_ts%2Ftestt_test&expires=1777881023"
        }
      }
    },
    "platformsCount": 0,
    "ssl_enabled": true,
    "hash": "testt_test",
    "securetoken": {
      "enabled": "Y",
      "policy": "D",
      "keyip": "N",
      "list": "aaa0efb4415b78b4",
      "timeout": 3600,
      "session": "0",
      "ips": "",
      "dirs": null,
      "active": "Y"
    },
    "domainlock": {
      "enabled": "Y",
      "policy": "Y",
      "list": "example.com,docs.example.com",
      "ips": "",
      "noreferer": "N",
      "active": "Y"
    },
    "geoblock": {
      "enabled": "Y",
      "policy": "Y",
      "list": [
        ""
      ],
      "ips": "",
      "active": "Y"
    },
    "ipaccess": {
      "enabled": "Y",
      "policy": "N",
      "list": "",
      "ips": "",
      "active": "N"
    },
    "useragent": {
      "enabled": "Y",
      "policy": "Y",
      "list": "",
      "ips": "",
      "casesensitive": "N",
      "active": "N",
      "listArr": [
        ""
      ]
    },
    "transcode": {
      "ltc": 0,
      "type": "mixed",
      "enabled": false,
      "isEditable": true
    },
    "platforms": [],
    "messages": {},
    "adInsertion": null
  }
}
POST
/streams/timeshift/{streamid}/securetoken
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
enabledstring

Enable or disable this feature. Y means enabled, N means disabled.

policystring

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.

liststring

The generated secure token used to sign and validate protected URLs.

timeoutinteger

Token or session expiry time in seconds.

sessionstring

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).

keyipboolean

Bind the secure token to the requester IP address. true means enabled, false means disabled.

ipsstring

Comma-separated IP addresses for access control. Leave empty for none.

modestring

Operation mode for this request. Common values: save, delete, clear, replace.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Path Parameters

streamidstring
Required

Stream ID

Example:
1001

Body

application/json
enabledstring

Enable or disable this feature. Y means enabled, N means disabled.

Example:
Y
policystring

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.

Example:
D
liststring

The generated secure token used to sign and validate protected URLs.

Example:
aaa0efb4415b78b4
timeoutinteger

Token or session expiry time in seconds.

Example:
3600
sessionstring

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).

Example:
0
keyipboolean

Bind the secure token to the requester IP address. true means enabled, false means disabled.

Example:
false
ipsstring

Comma-separated IP addresses for access control. Leave empty for none.

Example:
modestring

Operation mode for this request. Common values: save, delete, clear, replace.

Example:
save

Responses

resultstring

Status of the API response.

messagestring

Human-readable message describing the result.

streamobject

Stream object containing configuration and status details.