Video Session Token: 403 Error

Has anyone successfully been able to retrieve the session token on a private video? All of my attempts result in a 403 Forbidden response.

curl --request GET \
     --url https://vod.api.video/vod/${MY_VIDEO_ID}/token/${RETRIEVED_VIDEO_TOKEN}/session \
     --header 'accept: application/json' \
     --user '${MY_API_KEY}:'

But I consistently receive back the 403 response:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>403 Forbidden</title>
  </head>
  <body>
    <h1>Error 403 Forbidden</h1>
    <p>Forbidden</p>
    <h3>Error 54113</h3>
    <p>Details: cache-chi-kigq8000091-CHI 1726157393 3258205936</p>
    <hr>
    <p>Varnish cache server</p>
  </body>
</html>

Has anyone run into this before?

Hey, here’s the proper workflow to use and avh session :

1: Grab the private token from this response (as seen in assets)
curl --user ‘{api-key}:’ https://ws.api.video/videos/{videoId}

  1. Get a session token from the private token grabbed before
    curl -v https://vod.api.video/vod/{videoId}/token/{private-token}/session

  2. Now you can use it !
    Note that the session token can be used as an ?avh parameter to access the video assets.

Please remind that you MUST NOT try to use the private token for anything else before getting a session token (the private token would have been invalidated).

Regards

Thanks Hervé!

That was my issue. I was not waiting until the call to retrieve the session token had completed and subsequent lines of code would access and expire the video token prematurely.

Thanks again for your assistance and patience on this matter.

Regards

2 Likes