Authorizations
API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
Headers
UID of the user on whose behalf the action is performed.
Path Parameters
Id of the message whose thread messages are to be fetched.
curl --request GET \
--url https://{appid}.api-{region}.cometchat.io/v3/messages/{id}/thread \
--header 'apikey: <api-key>'
{
"data": [
{
"id": "2",
"conversationId": "superhero3_user_superhero5",
"sender": "superhero3",
"receiverType": "user",
"receiver": "superhero5",
"category": "message",
"type": "text",
"data": {
"text": "test hello",
"entities": {
"sender": {
"entity": {
"uid": "superhero3",
"name": "Spiderman",
"role": "default",
"avatar": "https://data-us.cometchat.io/assets/images/avatars/spiderman.png",
"status": "offline",
"createdAt": 1638361550
},
"entityType": "user"
},
"receiver": {
"entity": {
"uid": "superhero5",
"name": "Cyclops",
"role": "default",
"avatar": "https://data-us.cometchat.io/assets/images/avatars/cyclops.png",
"status": "offline",
"createdAt": 1638361550,
"conversationId": "superhero3_user_superhero5"
},
"entityType": "user"
}
},
"metadata": {
"key1": "val1"
}
},
"sentAt": 1638423490,
"updatedAt": 1638423490,
"parentId": "1"
}
],
"meta": {
"current": {
"limit": 10,
"count": 1
},
"next": {
"affix": "append",
"sentAt": 1638423490,
"id": "3"
}
}
}
Fetches the messages list of a thread.
curl --request GET \
--url https://{appid}.api-{region}.cometchat.io/v3/messages/{id}/thread \
--header 'apikey: <api-key>'
{
"data": [
{
"id": "2",
"conversationId": "superhero3_user_superhero5",
"sender": "superhero3",
"receiverType": "user",
"receiver": "superhero5",
"category": "message",
"type": "text",
"data": {
"text": "test hello",
"entities": {
"sender": {
"entity": {
"uid": "superhero3",
"name": "Spiderman",
"role": "default",
"avatar": "https://data-us.cometchat.io/assets/images/avatars/spiderman.png",
"status": "offline",
"createdAt": 1638361550
},
"entityType": "user"
},
"receiver": {
"entity": {
"uid": "superhero5",
"name": "Cyclops",
"role": "default",
"avatar": "https://data-us.cometchat.io/assets/images/avatars/cyclops.png",
"status": "offline",
"createdAt": 1638361550,
"conversationId": "superhero3_user_superhero5"
},
"entityType": "user"
}
},
"metadata": {
"key1": "val1"
}
},
"sentAt": 1638423490,
"updatedAt": 1638423490,
"parentId": "1"
}
],
"meta": {
"current": {
"limit": 10,
"count": 1
},
"next": {
"affix": "append",
"sentAt": 1638423490,
"id": "3"
}
}
}
API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
UID of the user on whose behalf the action is performed.
Id of the message whose thread messages are to be fetched.
Was this page helpful?