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>"
}
}
]
}
}API Endpoints
Get Session List
Retrieve a list of all streaming avatar sessions
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
ApiKeyAuthBearerAuth
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
Current page number, default is 1
Required range:
x >= 1Number of items per page, default is 100
Required range:
x >= 1Session status filter (1:queueing, 2:processing, 3:completed, 4:failed)
Available options:
1, 2, 3, 4 ⌘I