Create an anonymous playback session for a shared video
Create an anonymous playback session for a shared video
/v1/playback/embed-sessionsUnauthenticated session mint for videos whose visibility is public
or unlisted — called by the hosted watch/embed pages (and usable
from any page) so viewers never need a customer server to mint
tokens. Sessions carry every protection of the authenticated mint:
signed segment URLs, the edge session mirror, the heartbeat-gated
key, geo/ASN policy, and the account overdraft gate. The per-viewer
concurrency cap keys on a hash of the viewer IP. Rate limit: 30
requests per 60 s per IP.
Error codes: invalid_body (400), video_not_found (404),
video_not_playable (409), insufficient_balance (402).
المصادقة
- لا تتطلّب هذه العملية مصادقة.
المعاملات
لا تأخذ هذه العملية أي معاملات.
جسم الطلب
إلزامي
نوع المحتوى: application/json
المخطّط: EmbedSessionCreateRequest
{
"videoId": "01JZ9WV3N8GQ5T2M7K4C6XBARH"
}الاستجابات
| الرمز | المعنى |
|---|---|
201 | Playback session created. |
400 | The request body or query failed validation. The per-operation description lists the exact error.code values. |
402 | The account's balance is below its plan overdraft limit. |
404 | The resource does not exist or is not visible to this caller. |
409 | The request conflicts with the resource's current state. The per-operation description lists the exact error.code values. |
429 | Rate limit exceeded. |
مثال على الطلب
{
"videoId": "01JZ9WV3N8GQ5T2M7K4C6XBARH"
}جرّبها
/v1/playback/embed-sessionsمنصة API التفاعلية
أرسل طلبًا حيًا إلى api.videohati.com بمفتاح وضع الاختبار.
يُحفظ المفتاح في متصفحك على docs.videohati.com فقط.