GET
/
messages
/
{identifier}
Get messages
curl --request GET \
  --url https://localhost:5000/messages/{identifier} \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "messages": [
    {
      "sender": "<string>",
      "chat": "<string>",
      "message": "<string>",
      "_id": "<string>",
      "read_by": [
        "<string>"
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "chat": {
    "members": [
      "<string>"
    ],
    "_id": "<string>",
    "last_message": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

identifier
string
required

Username or user ID

Response

Messages between users

success
boolean
Example:

true

messages
object[]
chat
object