List collaborators
curl --request GET \
--url https://apimgmt.cometchat.io/apps/{appId}/collaborators \
--header 'key: <key>' \
--header 'secret: <secret>'import requests
url = "https://apimgmt.cometchat.io/apps/{appId}/collaborators"
headers = {
"key": "<key>",
"secret": "<secret>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {key: '<key>', secret: '<secret>'}};
fetch('https://apimgmt.cometchat.io/apps/{appId}/collaborators', 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://apimgmt.cometchat.io/apps/{appId}/collaborators",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"key: <key>",
"secret: <secret>"
],
]);
$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://apimgmt.cometchat.io/apps/{appId}/collaborators"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("key", "<key>")
req.Header.Add("secret", "<secret>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apimgmt.cometchat.io/apps/{appId}/collaborators")
.header("key", "<key>")
.header("secret", "<secret>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apimgmt.cometchat.io/apps/{appId}/collaborators")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["key"] = '<key>'
request["secret"] = '<secret>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "1",
"name": "Admin1",
"email": "admin1@cometchat.com",
"role": "admin",
"createdAt": 1618578628
},
{
"id": "2",
"name": "Admin2",
"email": "admin2@cometchat.com",
"role": "admin",
"createdAt": 1625220090
},
{
"id": "3",
"name": "Developer1",
"email": "developer1@cometchat.com",
"role": "developer",
"createdAt": 1625220076
}
]
}Team Management
List collaborators
Lists all the collaborators of an app.
GET
/
apps
/
{appId}
/
collaborators
List collaborators
curl --request GET \
--url https://apimgmt.cometchat.io/apps/{appId}/collaborators \
--header 'key: <key>' \
--header 'secret: <secret>'import requests
url = "https://apimgmt.cometchat.io/apps/{appId}/collaborators"
headers = {
"key": "<key>",
"secret": "<secret>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {key: '<key>', secret: '<secret>'}};
fetch('https://apimgmt.cometchat.io/apps/{appId}/collaborators', 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://apimgmt.cometchat.io/apps/{appId}/collaborators",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"key: <key>",
"secret: <secret>"
],
]);
$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://apimgmt.cometchat.io/apps/{appId}/collaborators"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("key", "<key>")
req.Header.Add("secret", "<secret>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apimgmt.cometchat.io/apps/{appId}/collaborators")
.header("key", "<key>")
.header("secret", "<secret>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apimgmt.cometchat.io/apps/{appId}/collaborators")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["key"] = '<key>'
request["secret"] = '<secret>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "1",
"name": "Admin1",
"email": "admin1@cometchat.com",
"role": "admin",
"createdAt": 1618578628
},
{
"id": "2",
"name": "Admin2",
"email": "admin2@cometchat.com",
"role": "admin",
"createdAt": 1625220090
},
{
"id": "3",
"name": "Developer1",
"email": "developer1@cometchat.com",
"role": "developer",
"createdAt": 1625220076
}
]
}For the complete error reference, see Error Guide.
Was this page helpful?
⌘I