GET
/
messages
/
{id}
Get Message
curl --request GET \
  --url https://{appid}.api-{region}.cometchat.io/v3/messages/{id} \
  --header 'apikey: <api-key>'
{
  "data": {
    "id": "1",
    "conversationId": "superhero3_user_superhero5",
    "sender": "superhero3",
    "receiverType": "user",
    "receiver": "superhero5",
    "category": "message",
    "type": "text",
    "data": {
      "text": "test     hello",
      "metadata": {
        "key1": "val1"
      },
      "entities": {
        "sender": {
          "entity": {
            "uid": "superhero3",
            "name": "Spiderman",
            "avatar": "https://data-us.cometchat.io/assets/images/avatars/spiderman.png",
            "status": "offline",
            "role": "default",
            "createdAt": 1638361550
          },
          "entityType": "user"
        },
        "receiver": {
          "entity": {
            "uid": "superhero5",
            "name": "Cyclops",
            "avatar": "https://data-us.cometchat.io/assets/images/avatars/cyclops.png",
            "status": "offline",
            "role": "default",
            "createdAt": 1638361550,
            "conversationId": "superhero3_user_superhero5"
          },
          "entityType": "user"
        }
      }
    },
    "sentAt": 1638423490,
    "updatedAt": 1638423490
  }
}

Authorizations

apikey
string
header
required

API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).

Headers

onBehalfOf
string

UID of the user on whose behalf the action is performed.

Path Parameters

id
string
required

Id of the message whose details are to be fetched.

Response

200 - application/json

Retreived Message

The response is of type object.