curl --request GET \
--url https://apix.us.amity.co/api/v5/message-feeds/channel/{channelId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apix.us.amity.co/api/v5/message-feeds/channel/{channelId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apix.us.amity.co/api/v5/message-feeds/channel/{channelId}', 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/api/v5/message-feeds/channel/{channelId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/api/v5/message-feeds/channel/{channelId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/api/v5/message-feeds/channel/{channelId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apix.us.amity.co/api/v5/message-feeds/channel/{channelId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"messageFeeds": [
{
"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>"
}
],
"messages": [
{
"messageId": "a85dca058f5b585f86a29f14",
"networkId": "9530b11ec8de87db22b06b27",
"channelId": "abc665aed9dbb8d036037eed",
"channelType": "community",
"messageFeedId": "507f191e810c19729de860ea",
"segment": 123,
"dataType": "text",
"data": {
"text": "test"
},
"fileId": "76bfe68974157a114053364d",
"thumbnailFileId": "76bfe68974157a114053364e",
"metadata": {
"refId": "d601c27c0675baa2103ec573"
},
"tags": [
"tag1",
"tag2"
],
"creatorId": "5349b4ddd2781d08c09890f4",
"mentionedUsers": [
{
"type": "user",
"userIds": [
"3cac302ab992aa17b215ba21",
"adb34ec2aeedca03a38e1d54"
]
}
],
"reactions": {
"like": 1,
"love": 2
},
"reactionCount": 123,
"parentId": "abc665afd7dbb8d036037eea",
"path": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239",
"flagCount": 123,
"childCount": 123,
"isDeleted": false,
"editedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"myReactions": [
"like",
"love"
]
}
],
"users": [
{
"userId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"_id": "<string>",
"path": "<string>",
"userInternalId": "<string>",
"userPublicId": "<string>",
"roles": [
"<string>"
],
"permissions": [],
"displayName": "<string>",
"profileHandle": "<string>",
"description": "<string>",
"avatarFileId": "<string>",
"avatarCustomUrl": "<string>",
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"metadata": {},
"isGlobalBan": true,
"isBrand": true,
"isDeleted": true
}
],
"paging": {
"next": "<string>",
"previous": "<string>",
"total": 123
}
}Finds message feeds by channelId and multiple conditions
Multiple conditions can be provided by query string
curl --request GET \
--url https://apix.us.amity.co/api/v5/message-feeds/channel/{channelId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apix.us.amity.co/api/v5/message-feeds/channel/{channelId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apix.us.amity.co/api/v5/message-feeds/channel/{channelId}', 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/api/v5/message-feeds/channel/{channelId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/api/v5/message-feeds/channel/{channelId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/api/v5/message-feeds/channel/{channelId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apix.us.amity.co/api/v5/message-feeds/channel/{channelId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"messageFeeds": [
{
"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>"
}
],
"messages": [
{
"messageId": "a85dca058f5b585f86a29f14",
"networkId": "9530b11ec8de87db22b06b27",
"channelId": "abc665aed9dbb8d036037eed",
"channelType": "community",
"messageFeedId": "507f191e810c19729de860ea",
"segment": 123,
"dataType": "text",
"data": {
"text": "test"
},
"fileId": "76bfe68974157a114053364d",
"thumbnailFileId": "76bfe68974157a114053364e",
"metadata": {
"refId": "d601c27c0675baa2103ec573"
},
"tags": [
"tag1",
"tag2"
],
"creatorId": "5349b4ddd2781d08c09890f4",
"mentionedUsers": [
{
"type": "user",
"userIds": [
"3cac302ab992aa17b215ba21",
"adb34ec2aeedca03a38e1d54"
]
}
],
"reactions": {
"like": 1,
"love": 2
},
"reactionCount": 123,
"parentId": "abc665afd7dbb8d036037eea",
"path": "12cba9779cc479e1fcefd1de/chat/f00ab16cbd27d4a9525aea6d/32b468ae0b1bd0cc7976719d/0a003482f0ac53a71e7c9239",
"flagCount": 123,
"childCount": 123,
"isDeleted": false,
"editedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"myReactions": [
"like",
"love"
]
}
],
"users": [
{
"userId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"_id": "<string>",
"path": "<string>",
"userInternalId": "<string>",
"userPublicId": "<string>",
"roles": [
"<string>"
],
"permissions": [],
"displayName": "<string>",
"profileHandle": "<string>",
"description": "<string>",
"avatarFileId": "<string>",
"avatarCustomUrl": "<string>",
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"metadata": {},
"isGlobalBan": true,
"isBrand": true,
"isDeleted": true
}
],
"paging": {
"next": "<string>",
"previous": "<string>",
"total": 123
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
channel ID of message feed that needs to be find Internal ID of the channel that the message feed belongs to
30"abc665aed9dbb8d036037eeb"
Query Parameters
deleted flag of message feed
Pagination options
after: string(30) : return documents after this message feed id
before: string(30) : return documents before this message feed id
limit: number(0, 100) default=10
sortBy: lastContentTimestampDesc
token: string(100) : This token will be generated by server using encryption of after, before, limit, sortBy. It would be returned in response payload (paging.next, paging.previous). The caller can send only token for getting data from previous or next page easily.
Page options by using cursor
Show child attributes
Show child attributes
Response
Paginated message feed payload