GetMessages

GET /chats/{chatId}/messages

Return messages from a chat

Path parameters

  • chatId string Required

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • _id string Required
    • chatId string Required

      Chat ID

    • senderId string Required

      User ID

    • text string Required
    • date string(date-time) Required
    • hasRead boolean
  • 403

    Forbidden

  • 500

    Internal Server Error

GET /chats/{chatId}/messages
curl \
 --request GET 'https://garden-to-yours.herokuapp.com/chats/{chatId}/messages' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
[
  {
    "_id": "string",
    "date": "2019-08-24T14:15:22Z",
    "text": "string",
    "chatId": "string",
    "hasRead": true,
    "senderId": "string"
  }
]