فيديوهاتيالتوثيق

Create an anonymous playback session for a shared video

Create an anonymous playback session for a shared video

POST/v1/playback/embed-sessions

Unauthenticated 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"
}

الاستجابات

الرمزالمعنى
201Playback session created.
400The request body or query failed validation. The per-operation description lists the exact error.code values.
402The account's balance is below its plan overdraft limit.
404The resource does not exist or is not visible to this caller.
409The request conflicts with the resource's current state. The per-operation description lists the exact error.code values.
429Rate limit exceeded.

مثال على الطلب

{
  "videoId": "01JZ9WV3N8GQ5T2M7K4C6XBARH"
}

جرّبها

POST
/v1/playback/embed-sessions
وضع الاختبار فقط

منصة API التفاعلية

أرسل طلبًا حيًا إلى api.videohati.com بمفتاح وضع الاختبار.

تحجب هذه المنصة مفاتيح vh_live_. استخدم مفتاحًا يبدأ بـ vh_test_ فقط؛ لن يغادر أي طلب بمفتاح حي متصفحك.

يُحفظ المفتاح في متصفحك على docs.videohati.com فقط.