Message Didflag webhook event
curl --request GET \
--url https://apix.us.amity.co/webhook/message.didFlagimport requests
url = "https://apix.us.amity.co/webhook/message.didFlag"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://apix.us.amity.co/webhook/message.didFlag', 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/message.didFlag",
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/message.didFlag"
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/message.didFlag")
.asString();require 'uri'
require 'net/http'
url = URI("https://apix.us.amity.co/webhook/message.didFlag")
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.didFlag",
"data": {
"messages": [
{
"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>"
]
}
]
}
],
"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 Didflag webhook event
Send updated message whenever a message got flag
GET
/
webhook
/
message.didFlag
Message Didflag webhook event
curl --request GET \
--url https://apix.us.amity.co/webhook/message.didFlagimport requests
url = "https://apix.us.amity.co/webhook/message.didFlag"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://apix.us.amity.co/webhook/message.didFlag', 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/message.didFlag",
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/message.didFlag"
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/message.didFlag")
.asString();require 'uri'
require 'net/http'
url = URI("https://apix.us.amity.co/webhook/message.didFlag")
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.didFlag",
"data": {
"messages": [
{
"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>"
]
}
]
}
],
"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