Skip to main content
GET
/
api
/
open
/
v4
/
liveAvatar
/
session
/
list
Get Session List
curl --request GET \
  --url https://openapi.akool.com/api/open/v4/liveAvatar/session/list \
  --header 'x-api-key: <api-key>'
import requests

url = "https://openapi.akool.com/api/open/v4/liveAvatar/session/list"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://openapi.akool.com/api/open/v4/liveAvatar/session/list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://openapi.akool.com/api/open/v4/liveAvatar/session/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://openapi.akool.com/api/open/v4/liveAvatar/session/list"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://openapi.akool.com/api/open/v4/liveAvatar/session/list")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://openapi.akool.com/api/open/v4/liveAvatar/session/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "code": 1000,
  "msg": "OK",
  "data": {
    "count": 123,
    "result": [
      {
        "_id": "<string>",
        "uid": 123,
        "type": 123,
        "stream_type": "<string>",
        "credentials": {
          "agora_uid": 123,
          "agora_app_id": "<string>",
          "agora_channel": "<string>",
          "agora_token": "<string>",
          "livekit_url": "<string>",
          "livekit_token": "<string>",
          "livekit_room_name": "<string>",
          "livekit_server_identity": "<string>",
          "livekit_client_identity": "<string>",
          "trtc_sdk_app_id": 123,
          "trtc_sdk_room_id": "<string>",
          "trtc_sdk_user_id": "<string>",
          "trtc_sdk_user_sig": "<string>"
        }
      }
    ]
  }
}

Authorizations

x-api-key
string
header
required

Your API Key used for request authorization. If both Authorization and x-api-key have values, Authorization will be used first and x-api-key will be discarded.

Query Parameters

page
integer
default:1

Current page number, default is 1

Required range: x >= 1
size
integer
default:100

Number of items per page, default is 100

Required range: x >= 1
status
enum<integer>

Session status filter (1:queueing, 2:processing, 3:completed, 4:failed)

Available options:
1,
2,
3,
4

Response

200 - application/json

List of sessions

code
integer
required

Interface returns business status code (1000: success)

Example:

1000

msg
string
required

Interface returns status information

Example:

"OK"

data
object