curl --request GET \
--url https://{appId}.call-{region}.cometchat.io/v3.0/calls \
--header 'apiKey: <api-key>'import requests
url = "https://{appId}.call-{region}.cometchat.io/v3.0/calls"
headers = {"apiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apiKey: '<api-key>'}};
fetch('https://{appId}.call-{region}.cometchat.io/v3.0/calls', 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://{appId}.call-{region}.cometchat.io/v3.0/calls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apiKey: <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://{appId}.call-{region}.cometchat.io/v3.0/calls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apiKey", "<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://{appId}.call-{region}.cometchat.io/v3.0/calls")
.header("apiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{appId}.call-{region}.cometchat.io/v3.0/calls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body"{\n \"data\": [\n {\n \"sessionId\": \"v1.us.31780434a95d45.1692368168aefba73a1e5938ad7a02f8e61ea1c9a287a08aeb\",\n \"totalAudioMinutes\": 0.31666666666666665,\n \"totalVideoMinutes\": 0,\n \"totalDuration\": \"00:00:19\",\n \"hasRecording\": false,\n \"initiatedAt\": 1692368168,\n \"initiator\": \"superhero8\",\n \"mode\": \"call\",\n \"receiver\": \"sivamathewstestgroup\",\n \"receiverType\": \"group\",\n \"status\": \"ended\",\n \"totalDurationInMinutes\": 0.31666666666666665,\n \"totalParticipants\": 2,\n \"type\": \"audio\",\n \"mid\": \"3f7596ac-854b-484d-b36c-d623e193bd81\",\n \"startedAt\": 1692368180,\n \"endedAt\": 1692368199,\n \"participants\": [\n {\n \"uid\": \"superhero2\",\n \"totalAudioMinutes\": 0.31666666666666665,\n \"totalVideoMinutes\": 0,\n \"isJoined\": true,\n \"state\": \"ended\",\n \"totalDuration\": 0.31666666666666665,\n \"deviceId\": \"b7683aaf-090a-4204-8f84-7ddd652923aa@rtc.cometchat-staging.com/ucTKf4eq\",\n \"joinedAt\": 1692368180,\n \"mid\": \"3f7596ac-854b-484d-b36c-d623e193bd81\",\n \"leftAt\": 1692368199\n },\n {\n \"uid\": \"superhero8\",\n \"totalAudioMinutes\": 0.2833333333333333,\n \"totalVideoMinutes\": 0,\n \"isJoined\": true,\n \"state\": \"ended\",\n \"totalDuration\": 0.2833333333333333,\n \"deviceId\": \"f55d46e5-2b1c-4b02-9072-382209a8753f@rtc.cometchat-staging.com/K-s6dB3N\",\n \"joinedAt\": 1692368180,\n \"mid\": \"3f7596ac-854b-484d-b36c-d623e193bd81\",\n \"leftAt\": 1692368197\n },\n {\n \"uid\": \"superhero4\",\n \"totalAudioMinutes\": 0,\n \"totalVideoMinutes\": 0,\n \"isJoined\": false,\n \"state\": \"unanswered\",\n \"totalDuration\": 0\n },\n {\n \"uid\": \"superhero7\",\n \"totalAudioMinutes\": 0,\n \"totalVideoMinutes\": 0,\n \"isJoined\": false,\n \"state\": \"unanswered\",\n \"totalDuration\": 0\n },\n {\n \"uid\": \"superhero6\",\n \"totalAudioMinutes\": 0,\n \"totalVideoMinutes\": 0,\n \"isJoined\": false,\n \"state\": \"unanswered\",\n \"totalDuration\": 0\n }\n ]\n },\n {\n \"sessionId\": \"v1.us.31780434a95d45.16923681138d75114d60d1345a22e4cc612263fb26c0b5cf92\",\n \"totalAudioMinutes\": 0.31666666666666665,\n \"totalVideoMinutes\": 0,\n \"totalDuration\": \"00:00:19\",\n \"hasRecording\": false,\n \"initiatedAt\": 1692368113,\n \"initiator\": \"superhero8\",\n \"mode\": \"call\",\n \"receiver\": \"superhero2\",\n \"receiverType\": \"user\",\n \"status\": \"ended\",\n \"totalDurationInMinutes\": 0.31666666666666665,\n \"totalParticipants\": 2,\n \"type\": \"audio\",\n \"mid\": \"855e1519-1244-4213-8e40-53044c1e9e43\",\n \"startedAt\": 1692368127,\n \"endedAt\": 1692368146,\n \"participants\": [\n {\n \"uid\": \"superhero8\",\n \"totalAudioMinutes\": 0.26666666666666666,\n \"totalVideoMinutes\": 0,\n \"totalDuration\": 0.26666666666666666,\n \"deviceId\": \"70ecae89-b71c-4bb3-8220-b7c99ec1658f@rtc.cometchat-staging.com/hsYWb5ul\",\n \"isJoined\": true,\n \"joinedAt\": 1692368128,\n \"mid\": \"855e1519-1244-4213-8e40-53044c1e9e43\",\n \"state\": \"ended\",\n \"leftAt\": 1692368144\n },\n {\n \"uid\": \"superhero2\",\n \"totalAudioMinutes\": 0.23333333333333334,\n \"totalVideoMinutes\": 0,\n \"totalDuration\": 0.23333333333333334,\n \"deviceId\": \"c9ed493e-8495-428d-b6ee-b32019cc57ce@rtc.cometchat-staging.com/CKT3xgR4\",\n \"isJoined\": true,\n \"joinedAt\": 1692368132,\n \"mid\": \"855e1519-1244-4213-8e40-53044c1e9e43\",\n \"state\": \"ended\",\n \"leftAt\": 1692368146\n }\n ]\n }\n ],\n \"meta\": {\n \"pagination\": {\n \"total\": 2,\n \"count\": 2,\n \"total_pages\": 1,\n \"current_page\": 1\n }\n }\n}""{}"List Calls
lists all the calls that are available in the app. It can include participants, and recordings property in the response (if present).
curl --request GET \
--url https://{appId}.call-{region}.cometchat.io/v3.0/calls \
--header 'apiKey: <api-key>'import requests
url = "https://{appId}.call-{region}.cometchat.io/v3.0/calls"
headers = {"apiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apiKey: '<api-key>'}};
fetch('https://{appId}.call-{region}.cometchat.io/v3.0/calls', 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://{appId}.call-{region}.cometchat.io/v3.0/calls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apiKey: <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://{appId}.call-{region}.cometchat.io/v3.0/calls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apiKey", "<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://{appId}.call-{region}.cometchat.io/v3.0/calls")
.header("apiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{appId}.call-{region}.cometchat.io/v3.0/calls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body"{\n \"data\": [\n {\n \"sessionId\": \"v1.us.31780434a95d45.1692368168aefba73a1e5938ad7a02f8e61ea1c9a287a08aeb\",\n \"totalAudioMinutes\": 0.31666666666666665,\n \"totalVideoMinutes\": 0,\n \"totalDuration\": \"00:00:19\",\n \"hasRecording\": false,\n \"initiatedAt\": 1692368168,\n \"initiator\": \"superhero8\",\n \"mode\": \"call\",\n \"receiver\": \"sivamathewstestgroup\",\n \"receiverType\": \"group\",\n \"status\": \"ended\",\n \"totalDurationInMinutes\": 0.31666666666666665,\n \"totalParticipants\": 2,\n \"type\": \"audio\",\n \"mid\": \"3f7596ac-854b-484d-b36c-d623e193bd81\",\n \"startedAt\": 1692368180,\n \"endedAt\": 1692368199,\n \"participants\": [\n {\n \"uid\": \"superhero2\",\n \"totalAudioMinutes\": 0.31666666666666665,\n \"totalVideoMinutes\": 0,\n \"isJoined\": true,\n \"state\": \"ended\",\n \"totalDuration\": 0.31666666666666665,\n \"deviceId\": \"b7683aaf-090a-4204-8f84-7ddd652923aa@rtc.cometchat-staging.com/ucTKf4eq\",\n \"joinedAt\": 1692368180,\n \"mid\": \"3f7596ac-854b-484d-b36c-d623e193bd81\",\n \"leftAt\": 1692368199\n },\n {\n \"uid\": \"superhero8\",\n \"totalAudioMinutes\": 0.2833333333333333,\n \"totalVideoMinutes\": 0,\n \"isJoined\": true,\n \"state\": \"ended\",\n \"totalDuration\": 0.2833333333333333,\n \"deviceId\": \"f55d46e5-2b1c-4b02-9072-382209a8753f@rtc.cometchat-staging.com/K-s6dB3N\",\n \"joinedAt\": 1692368180,\n \"mid\": \"3f7596ac-854b-484d-b36c-d623e193bd81\",\n \"leftAt\": 1692368197\n },\n {\n \"uid\": \"superhero4\",\n \"totalAudioMinutes\": 0,\n \"totalVideoMinutes\": 0,\n \"isJoined\": false,\n \"state\": \"unanswered\",\n \"totalDuration\": 0\n },\n {\n \"uid\": \"superhero7\",\n \"totalAudioMinutes\": 0,\n \"totalVideoMinutes\": 0,\n \"isJoined\": false,\n \"state\": \"unanswered\",\n \"totalDuration\": 0\n },\n {\n \"uid\": \"superhero6\",\n \"totalAudioMinutes\": 0,\n \"totalVideoMinutes\": 0,\n \"isJoined\": false,\n \"state\": \"unanswered\",\n \"totalDuration\": 0\n }\n ]\n },\n {\n \"sessionId\": \"v1.us.31780434a95d45.16923681138d75114d60d1345a22e4cc612263fb26c0b5cf92\",\n \"totalAudioMinutes\": 0.31666666666666665,\n \"totalVideoMinutes\": 0,\n \"totalDuration\": \"00:00:19\",\n \"hasRecording\": false,\n \"initiatedAt\": 1692368113,\n \"initiator\": \"superhero8\",\n \"mode\": \"call\",\n \"receiver\": \"superhero2\",\n \"receiverType\": \"user\",\n \"status\": \"ended\",\n \"totalDurationInMinutes\": 0.31666666666666665,\n \"totalParticipants\": 2,\n \"type\": \"audio\",\n \"mid\": \"855e1519-1244-4213-8e40-53044c1e9e43\",\n \"startedAt\": 1692368127,\n \"endedAt\": 1692368146,\n \"participants\": [\n {\n \"uid\": \"superhero8\",\n \"totalAudioMinutes\": 0.26666666666666666,\n \"totalVideoMinutes\": 0,\n \"totalDuration\": 0.26666666666666666,\n \"deviceId\": \"70ecae89-b71c-4bb3-8220-b7c99ec1658f@rtc.cometchat-staging.com/hsYWb5ul\",\n \"isJoined\": true,\n \"joinedAt\": 1692368128,\n \"mid\": \"855e1519-1244-4213-8e40-53044c1e9e43\",\n \"state\": \"ended\",\n \"leftAt\": 1692368144\n },\n {\n \"uid\": \"superhero2\",\n \"totalAudioMinutes\": 0.23333333333333334,\n \"totalVideoMinutes\": 0,\n \"totalDuration\": 0.23333333333333334,\n \"deviceId\": \"c9ed493e-8495-428d-b6ee-b32019cc57ce@rtc.cometchat-staging.com/CKT3xgR4\",\n \"isJoined\": true,\n \"joinedAt\": 1692368132,\n \"mid\": \"855e1519-1244-4213-8e40-53044c1e9e43\",\n \"state\": \"ended\",\n \"leftAt\": 1692368146\n }\n ]\n }\n ],\n \"meta\": {\n \"pagination\": {\n \"total\": 2,\n \"count\": 2,\n \"total_pages\": 1,\n \"current_page\": 1\n }\n }\n}""{}"Authorizations
Headers
UID of the user on whose behalf the action is performed.
Query Parameters
It includes the type of the call, possible values: audio & video
audio, video It represents the mode of call, possible values: call, meet & presenter.
call, meet, presenter This query parameter allows you to filter the list of calls based on the number of participants involved in each call. For example, participantsCount=5 will return calls that had exactly 5 participants.
It represents when the call was started. It's 10 digit unix timestamp.
It indicates the status of the call. Possible values are unanswered, rejected, ongoing, ended.
unanswered, rejected, ongoing, ended It indicates if it was 1-1 call of group call. Possible values: user & group.
user, group It represents when the call was ended.
It's a boolean field indicating if the call has recording present or not.
It fetches only those calls in which the passed uid is a part of.