Documentation

Sessions API

Sessions API is responsible for generation of user session tokens.

Create Session

/sessions

Generates new session for passed identity.

Body params:

identity* String

Unique string that identify your user. Could be user id, email, etc.

Response:

{
    "session_key": "1nU73GCsMnqT2sudzHPMo6az",
    "identity": "YOUR_IDENTITY"
}

Example:

curl --request POST \
  --url https://api.video.io/v1/sessions \
  --header 'accept: application/json; charset=utf-8' \
  --header 'authorization: App token=YOUR_SECRET_TOKEN' \
  --data 'identity=UNIQUE_IDENTITY'
var request = require('request');

var options = {
  method: 'POST',
  url: 'https://api.video.io/v1/sessions',
  headers: {
    accept: 'application/json; charset=utf-8',
    authorization: 'App token=YOUR_SECRET_TOKEN'
  },
  body: {
    identity: 'UNIQUE_IDENTITY'
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.video.io/v1/sessions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json; charset=utf-8'
request["authorization"] = 'App token=YOUR_SECRET_TOKEN'
request.set_form_data({"identity" => "UNIQUE_IDENTITY"})

response = http.request(request)
puts response.read_body
import requests

url = "https://api.video.io/v1/sessions"

headers = {
  'accept': 'application/json; charset=utf-8',
  'authorization': 'App token=YOUR_SECRET_TOKEN'
}
body = {
  'identity': 'UNIQUE_IDENTITY'
}

response = requests.request("POST", url, data=json.dumps(body), headers=headers)

print(response.text)