Skip to content
Products

Authorizers API

An authorizer decides who can open the playlist of a channel. A channel uses an authorizer with its authorizer field. Read more about the methods and their priority in Authorizers.

All requests of this page are available to the admin role only.

{
"id": "token-auth",
"ip": ["allow 192.168.0.0/24", "deny 10.0.0.1"],
"securetoken": "my-secret",
"backend": ["http://auth.example.com/check"],
"default": "deny"
}
  • id: Authorizer ID. Only in the create request.
  • ip (optional): List of rules in the format <action> <address>. Read more in IP.
  • securetoken (optional): The secret for Securetoken.
  • backend (optional): List of URLs of your HTTP backend.
  • default: What to do when no method decided: allow, deny, or pass. Always set it.
Terminal window
POST /api/ott/authorizer

Example:

Terminal window
curl -sS -X POST -H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
'http://alta.example.com:8100/api/ott/authorizer' \
-d '{"id": "token-auth", "securetoken": "my-secret", "default": "deny"}'

Returns 204, or 409 if an authorizer with this ID exists.

Terminal window
GET /api/ott/authorizer?id=<authorizer_id>

Returns the authorizer object without the id field, or 404.

Terminal window
PUT /api/ott/authorizer?id=<authorizer_id>

Send the complete object. A method you omit is removed from the authorizer. Returns 204, or 404.

Terminal window
DELETE /api/ott/authorizer?id=<authorizer_id>

Remove the authorizer from the channels first with Update a Channel, so no channel refers to an authorizer that does not exist. Returns 204, or 404.

Terminal window
GET /api/ott/securetoken?id=<authorizer_id>&path=<path>&ip=<ip>&start=<time>&end=<time>

Calculates the token for one viewer. Use it when your middleware does not calculate the token itself. The authorizer must have the securetoken secret.

  • id: Authorizer ID.
  • path: Path of the playlist, exactly as the viewer requests it, for example /news/index.m3u8.
  • ip: IP address of the viewer.
  • start, end: The time when the token starts and stops to work, in the RFC 3339 format, for example 2026-11-07T10:00:00Z.

Example:

Terminal window
curl -sS -G -H "Authorization: Bearer $TOKEN" \
'http://alta.example.com:8100/api/ott/securetoken' \
--data-urlencode 'id=token-auth' \
--data-urlencode 'path=/news/index.m3u8' \
--data-urlencode 'ip=203.0.113.5' \
--data-urlencode 'start=2026-11-07T10:00:00Z' \
--data-urlencode 'end=2026-11-07T12:00:00Z'

Response: the token as a JSON string:

"e8bff06f373694dda657e8417fe76f6b54b69807-a5cd6c00-1794052800-1794045600"

Add the token to the playlist URL:

http://alta.example.com:8101/news/index.m3u8?token=e8bff06f373694dda657e8417fe76f6b54b69807-a5cd6c00-1794052800-1794045600
CodeDescription
200The token
400A time is not in the RFC 3339 format
404The authorizer does not exist, or it has no securetoken