Message Diddelete webhook event
curl --request GET \
--url https://apix.us.amity.co/webhook/v5.message.didDeleteimport requests
url = "https://apix.us.amity.co/webhook/v5.message.didDelete"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://apix.us.amity.co/webhook/v5.message.didDelete', 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://apix.us.amity.co/webhook/v5.message.didDelete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://apix.us.amity.co/webhook/v5.message.didDelete"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apix.us.amity.co/webhook/v5.message.didDelete")
.asString();require 'uri'
require 'net/http'
url = URI("https://apix.us.amity.co/webhook/v5.message.didDelete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"event": "message.didDelete",
"data": {
"files": [
{
"fileId": "<string>",
"fileUrl": "<string>",
"accessType": "public",
"altText": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"attributes": {
"name": "<string>",
"extension": "<string>",
"size": 123,
"mimeType": "<string>",
"metadata": {
"exif": {},
"gps": {},
"height": 123,
"width": 123,
"isFull": true
}
}
}
],
"messageFeeds": [
{
"messageId": "<string>",
"channelId": "<string>",
"userId": "<string>",
"channelSegment": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"_id": "<string>",
"path": "<string>",
"parentId": "<string>",
"childrenNumber": 123,
"type": "<string>",
"tags": [
"<string>"
],
"data": {},
"isDeleted": true,
"editedAt": "2023-11-07T05:31:56Z",
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"reactions": {},
"reactionsCount": 123,
"myReactions": [
"<string>"
],
"latestReaction": {
"referenceId": "<string>",
"referenceType": "<string>",
"reactionName": "<string>",
"userId": "<string>",
"userDisplayName": "<string>",
"reactionId": "<string>",
"eventName": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"mentionees": [
{
"userIds": [
"<string>"
],
"userPublicIds": [
"<string>"
],
"userInternalIds": [
"<string>"
]
}
]
}
],
"messages": [
{
"messageFeedId": "a85dca058f5b585f86a29f14",
"channelId": "abc665aed9dbb8d036037eeb",
"channelPublicId": "abc665aed9dbb8d036037eeb",
"channelType": "community",
"name": "text",
"creatorId": "8aa313c8dbb00af911b07672",
"path": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239",
"childCount": 123,
"isDeleted": false,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"lastMessageId": "9530b11ec8de87db22b06b21",
"lastMessageTimestamp": "2023-11-07T05:31:56Z",
"editedAt": "2023-11-07T05:31:56Z",
"messagePreviewId": "<string>"
}
],
"reactions": [
{
"referenceId": "<string>",
"referenceType": "<string>",
"reactors": [
{
"reactionName": "<string>",
"userId": "<string>",
"userPublicIdId": "<string>",
"userInternalId": "<string>",
"reactionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
],
"users": [
{
"userId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"_id": "<string>",
"path": "<string>",
"roles": [
"<string>"
],
"displayName": "<string>",
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"metadata": {},
"isDeleted": true
}
]
}
}Webhook event
Message Diddelete webhook event
Send deleted message whenever a message got deleted in a channel
GET
/
webhook
/
v5.message.didDelete
Message Diddelete webhook event
curl --request GET \
--url https://apix.us.amity.co/webhook/v5.message.didDeleteimport requests
url = "https://apix.us.amity.co/webhook/v5.message.didDelete"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://apix.us.amity.co/webhook/v5.message.didDelete', 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://apix.us.amity.co/webhook/v5.message.didDelete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://apix.us.amity.co/webhook/v5.message.didDelete"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apix.us.amity.co/webhook/v5.message.didDelete")
.asString();require 'uri'
require 'net/http'
url = URI("https://apix.us.amity.co/webhook/v5.message.didDelete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"event": "message.didDelete",
"data": {
"files": [
{
"fileId": "<string>",
"fileUrl": "<string>",
"accessType": "public",
"altText": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"attributes": {
"name": "<string>",
"extension": "<string>",
"size": 123,
"mimeType": "<string>",
"metadata": {
"exif": {},
"gps": {},
"height": 123,
"width": 123,
"isFull": true
}
}
}
],
"messageFeeds": [
{
"messageId": "<string>",
"channelId": "<string>",
"userId": "<string>",
"channelSegment": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"_id": "<string>",
"path": "<string>",
"parentId": "<string>",
"childrenNumber": 123,
"type": "<string>",
"tags": [
"<string>"
],
"data": {},
"isDeleted": true,
"editedAt": "2023-11-07T05:31:56Z",
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"reactions": {},
"reactionsCount": 123,
"myReactions": [
"<string>"
],
"latestReaction": {
"referenceId": "<string>",
"referenceType": "<string>",
"reactionName": "<string>",
"userId": "<string>",
"userDisplayName": "<string>",
"reactionId": "<string>",
"eventName": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"mentionees": [
{
"userIds": [
"<string>"
],
"userPublicIds": [
"<string>"
],
"userInternalIds": [
"<string>"
]
}
]
}
],
"messages": [
{
"messageFeedId": "a85dca058f5b585f86a29f14",
"channelId": "abc665aed9dbb8d036037eeb",
"channelPublicId": "abc665aed9dbb8d036037eeb",
"channelType": "community",
"name": "text",
"creatorId": "8aa313c8dbb00af911b07672",
"path": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239",
"childCount": 123,
"isDeleted": false,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"lastMessageId": "9530b11ec8de87db22b06b21",
"lastMessageTimestamp": "2023-11-07T05:31:56Z",
"editedAt": "2023-11-07T05:31:56Z",
"messagePreviewId": "<string>"
}
],
"reactions": [
{
"referenceId": "<string>",
"referenceType": "<string>",
"reactors": [
{
"reactionName": "<string>",
"userId": "<string>",
"userPublicIdId": "<string>",
"userInternalId": "<string>",
"reactionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
],
"users": [
{
"userId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"_id": "<string>",
"path": "<string>",
"roles": [
"<string>"
],
"displayName": "<string>",
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"metadata": {},
"isDeleted": true
}
]
}
}⌘I