Get Call
curl --request GET \
--url https://{appId}.call-{region}.cometchat.io/v3.0/calls/{sessionId} \
--header 'apiKey: <api-key>'import requests
url = "https://{appId}.call-{region}.cometchat.io/v3.0/calls/{sessionId}"
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/{sessionId}', 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/{sessionId}",
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/{sessionId}"
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/{sessionId}")
.header("apiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{appId}.call-{region}.cometchat.io/v3.0/calls/{sessionId}")
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.eu.2574867aa2e6e417.17158459999d7fa95b1b4faea599f11eb5ecf07611b0b335c3\",\n \"totalAudioMinutes\": 0,\n \"totalVideoMinutes\": 0,\n \"totalDuration\": \"00:00:00\",\n \"hasRecording\": false,\n \"initiatedAt\": 1715845999,\n \"initiator\": \"superhero1\",\n \"mode\": \"call\",\n \"receiver\": \"superhero2\",\n \"receiverType\": \"user\",\n \"status\": \"initiated\",\n \"totalDurationInMinutes\": 0,\n \"totalParticipants\": 0,\n \"type\": \"audio\",\n \"participants\": [\n {\n \"uid\": \"superhero1\",\n \"totalAudioMinutes\": 0,\n \"totalVideoMinutes\": 0,\n \"isJoined\": false,\n \"totalDurationInMinutes\": 0,\n \"name\": \"Iron Man\",\n \"avatar\": \"https://data-eu.cometchat.io/assets/images/avatars/ironman.png\"\n },\n {\n \"uid\": \"superhero2\",\n \"totalAudioMinutes\": 0,\n \"totalVideoMinutes\": 0,\n \"isJoined\": false,\n \"state\": \"unanswered\",\n \"totalDurationInMinutes\": 0,\n \"name\": \"Captain America\",\n \"avatar\": \"https://data-eu.cometchat.io/assets/images/avatars/captainamerica.png\"\n }\n ],\n \"data\": {\n \"entities\": {\n \"initiator\": {\n \"entity\": {\n \"uid\": \"superhero1\",\n \"name\": \"Iron Man\",\n \"avatar\": \"https://data-eu.cometchat.io/assets/images/avatars/ironman.png\"\n }\n },\n \"receiver\": {\n \"entity\": {\n \"uid\": \"superhero2\",\n \"name\": \"Captain America\",\n \"avatar\": \"https://data-eu.cometchat.io/assets/images/avatars/captainamerica.png\"\n }\n }\n }\n }\n }\n ]\n}""{}"Calls
Get Call
Fetches all the details of the call whose sessionId is passed in the URL.
GET
/
calls
/
{sessionId}
Get Call
curl --request GET \
--url https://{appId}.call-{region}.cometchat.io/v3.0/calls/{sessionId} \
--header 'apiKey: <api-key>'import requests
url = "https://{appId}.call-{region}.cometchat.io/v3.0/calls/{sessionId}"
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/{sessionId}', 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/{sessionId}",
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/{sessionId}"
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/{sessionId}")
.header("apiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{appId}.call-{region}.cometchat.io/v3.0/calls/{sessionId}")
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.eu.2574867aa2e6e417.17158459999d7fa95b1b4faea599f11eb5ecf07611b0b335c3\",\n \"totalAudioMinutes\": 0,\n \"totalVideoMinutes\": 0,\n \"totalDuration\": \"00:00:00\",\n \"hasRecording\": false,\n \"initiatedAt\": 1715845999,\n \"initiator\": \"superhero1\",\n \"mode\": \"call\",\n \"receiver\": \"superhero2\",\n \"receiverType\": \"user\",\n \"status\": \"initiated\",\n \"totalDurationInMinutes\": 0,\n \"totalParticipants\": 0,\n \"type\": \"audio\",\n \"participants\": [\n {\n \"uid\": \"superhero1\",\n \"totalAudioMinutes\": 0,\n \"totalVideoMinutes\": 0,\n \"isJoined\": false,\n \"totalDurationInMinutes\": 0,\n \"name\": \"Iron Man\",\n \"avatar\": \"https://data-eu.cometchat.io/assets/images/avatars/ironman.png\"\n },\n {\n \"uid\": \"superhero2\",\n \"totalAudioMinutes\": 0,\n \"totalVideoMinutes\": 0,\n \"isJoined\": false,\n \"state\": \"unanswered\",\n \"totalDurationInMinutes\": 0,\n \"name\": \"Captain America\",\n \"avatar\": \"https://data-eu.cometchat.io/assets/images/avatars/captainamerica.png\"\n }\n ],\n \"data\": {\n \"entities\": {\n \"initiator\": {\n \"entity\": {\n \"uid\": \"superhero1\",\n \"name\": \"Iron Man\",\n \"avatar\": \"https://data-eu.cometchat.io/assets/images/avatars/ironman.png\"\n }\n },\n \"receiver\": {\n \"entity\": {\n \"uid\": \"superhero2\",\n \"name\": \"Captain America\",\n \"avatar\": \"https://data-eu.cometchat.io/assets/images/avatars/captainamerica.png\"\n }\n }\n }\n }\n }\n ]\n}""{}"⌘I