List Triggers
curl --request GET \
--url https://apimgmt.cometchat.io/apps/{appId}/webhooks/{webhookId}/triggers \
--header 'key: <key>' \
--header 'secret: <secret>'import requests
url = "https://apimgmt.cometchat.io/apps/{appId}/webhooks/{webhookId}/triggers"
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}/webhooks/{webhookId}/triggers', 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}/webhooks/{webhookId}/triggers",
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}/webhooks/{webhookId}/triggers"
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}/webhooks/{webhookId}/triggers")
.header("key", "<key>")
.header("secret", "<secret>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apimgmt.cometchat.io/apps/{appId}/webhooks/{webhookId}/triggers")
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": "message_delivery_receipt",
"description": "[Beta] The hook triggers when the client chat application confirms with Cometchat servers that a message was delivered."
},
{
"id": "message_read_receipt",
"description": "[Beta] The hook triggers when the client chat application confirms with Cometchat servers that a message was read."
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 100,
"current_page": 1,
"total_pages": 1
}
}
}Webhooks
List Triggers
List triggers attached to a webhook in an app.
GET
/
apps
/
{appId}
/
webhooks
/
{webhookId}
/
triggers
List Triggers
curl --request GET \
--url https://apimgmt.cometchat.io/apps/{appId}/webhooks/{webhookId}/triggers \
--header 'key: <key>' \
--header 'secret: <secret>'import requests
url = "https://apimgmt.cometchat.io/apps/{appId}/webhooks/{webhookId}/triggers"
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}/webhooks/{webhookId}/triggers', 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}/webhooks/{webhookId}/triggers",
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}/webhooks/{webhookId}/triggers"
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}/webhooks/{webhookId}/triggers")
.header("key", "<key>")
.header("secret", "<secret>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apimgmt.cometchat.io/apps/{appId}/webhooks/{webhookId}/triggers")
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": "message_delivery_receipt",
"description": "[Beta] The hook triggers when the client chat application confirms with Cometchat servers that a message was delivered."
},
{
"id": "message_read_receipt",
"description": "[Beta] The hook triggers when the client chat application confirms with Cometchat servers that a message was read."
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 100,
"current_page": 1,
"total_pages": 1
}
}
}For the complete error reference, see Error Guide.
Headers
Authorization Key
Authorization Secret
The "X-Webhook-Version" header is an optional integer property.When this header is omitted from the request, the system defaults to the legacy webhook, ensuring backward compatibility and seamless operation.Conversely, setting the value of this header to "2" indicates the preference for the new webhook implementation.
Path Parameters
AppID in which the extension has to be enabled/disabled
Id of the webhook
Was this page helpful?
⌘I