Global SettingsUpdate Secure Token Settings

Update Secure Token Settings

update stream securetoken setting

curl -X POST "https://api.5centscdn.com/v2/streams/settings/security/securetoken" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "enabled": "N",
  "policy": "D",
  "list": "abc123xyz",
  "timeout": "300",
  "session": "0",
  "keyip": false,
  "ips": "192.168.0.1",
  "mode": "save"
}'
{
  "result": "success",
  "message": "Stream Settings Updated. Please wait till the deployment completes."
}
POST
/streams/settings/security/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 secure token. 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.

timeoutstring

Secure token link expiration time in seconds. Min 5 max 25200.

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

List of IPs to whitelist when secure token is enabled. IPs should be separated by comma.

modestring

Controls how the settings are applied to streams. save — only saves the settings, no changes will be made to existing stream settings. append — appends the values to existing streams data and updates. overwrite — overwrites the existing streams values, replacing them and updates.

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.

Body

application/json
enabledstring

Enable or disable secure token. Y means enabled, N means disabled.

Example:
N
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:
abc123xyz
timeoutstring

Secure token link expiration time in seconds. Min 5 max 25200.

Example:
300
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

List of IPs to whitelist when secure token is enabled. IPs should be separated by comma.

Example:
192.168.0.1
modestring

Controls how the settings are applied to streams. save — only saves the settings, no changes will be made to existing stream settings. append — appends the values to existing streams data and updates. overwrite — overwrites the existing streams values, replacing them and updates.

Example:
save

Responses

resultstring

Status of the API response.

messagestring

Human-readable message describing the result.