أوكتا فيديو في مرحلة البيتا الخاصة: قد تتغير الواجهة البرمجية قبل الإطلاق العام.
OctaVideoالتوثيق

Create a playback OTP

POST
/libraries/{library_id}/otp

Creates a one-time password (OTP) for one video of the library. Put it in the player's embed address: https://player.octavideo.tech/embed/{video_id}?otp={otp}.

Call it from your server each time a viewer opens a page with the video, and never send your private key to the browser. The OTP plays that video until expires_at, as often as the page reloads; after that the embed page answers that the link has expired, so create a fresh OTP for every page view.

The video must be Ready. The OTP is checked when the embed page loads; a playback that started keeps going after expires_at.

Authorization

PrivateKey
headerAuthorizationBearer <ovk_…>

The library's private key, ovk_ and 52 more characters, as Authorization: Bearer ovk_…. Copy it in the console under API & embeds → Custom Backend. Keep it on your server only.

Path Parameters

library_id*string

The library's ID: on the console's user board under the library's name, and in the address of its pages.

Formatuuid

Request Body

application/json
  1. body
video_id*string

A Ready video of this library: its Video ID on Video details.

Formatuuid
ttl?integer

How many seconds the OTP works for.

Range30 <= value <= 3600
Default300
watermark?string

Text the player draws over the video for this viewer, such as their email, so a recording shows who made it. Left out: no text is drawn. The library's watermark settings in the console decide how the text moves, and can turn it off: then it isn't drawn.

Lengthlength <= 255

Response Body

The OTP, its video and when it stops working.

application/json
  1. response
data*
curl -X POST 'https://api.octavideo.tech/v1/libraries/0b8e5d3a-1c2f-4e6a-8b7d-9f0a1b2c3d4e/otp' \  -H 'Content-Type: application/json' \  -d '{  "video_id": "6f1c2b9e-4a7d-4f3e-9b8a-2d5c7e1f0a34"}'
Example Response
{  "data": {    "otp": "J5RXIYKWNFSGK3ZAONQW24DMMUQE6VCQHIQG433UEBZGKYLMEEQQ",    "video_id": "6f1c2b9e-4a7d-4f3e-9b8a-2d5c7e1f0a34",    "expires_at": "2026-11-21T16:15:44.858541Z"  }}