🚀 Version 2.0 is now live! See our changelog for details
cURL
curl --request PUT \ --url https://api.tenbyte.io/v1/stream/libraries/{libraryId}/security \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "referrers": { "action": "allow", "values": [ "example.com", "partner.com" ], "enabled": true }, "countries": { "action": "deny", "values": [ "RU", "CN" ], "enabled": true }, "video_privacy": "private" } '
{ "data": { "whitelist_referrers": { "action": "allow", "values": [ "www.vidinfra.com", "app.partnerdomain.com" ], "enabled": false }, "blocked_countries": { "action": "allow", "values": [ "CN", "RU" ], "enabled": false }, "video_privacy": "unlisted" }, "message": "Security Settings Updated Successfully", "success": true }
Update a library’s security configurations such as access level, allowed domains, or token-based restrictions.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Unique identifier of the library.
Defines domain-level access control based on HTTP referrers.
Show child attributes
Specifies whether the listed domains are 'allow' or 'block' actions.
List of domain names or patterns to allow or block (e.g., 'example.com', '*.trustedsite.com').
Determines whether referrer-based restrictions are active.
Defines geo-based access control based on viewer country.
Specifies whether the listed countries are 'allow' or 'block' actions.
List of ISO 3166-1 alpha-2 country codes to allow or block (e.g., 'US', 'BD', 'IN').
Determines whether country-based access restrictions are active.
Sets the default privacy level for videos. Possible values: 'public', 'private', or 'restricted'.