This method allows an app to fetch specific messages from a conversation.
The method endpoint is https://api.flock.co/v1/chat.fetchMessages
and follows the method calling conventions.
Your app provides a list of message uids to fetch, and Flock will, in response, return a list of Message objects.
Name | Type | Required | Description |
---|---|---|---|
token | String | Yes | Token of the user on whose behalf the message is being sent |
chat | String | Yes | Identifier for user or group for which messages are to be fetched |
uids | Array | Yes | A comma separated list of message uids (max length: 25). If a message doesn't exist for any uid, it is silently skipped. Example: |
A list of Message objects.
[ { "from": "u:1e6429de-16b7-48b3-acc0-c2d7ec5ad195", "to": "u:cfc76545-3400-4864-892a-513a9f4ae409", "uid": "fd4877b719b1", "text": "Hello" }, { "from": "u:cfc76545-3400-4864-892a-513a9f4ae409", "to": "u:1e6429de-16b7-48b3-acc0-c2d7ec5ad195", "uid": "59e2da001af2", "text": "Hello again" } ] |
Error Code | HTTP Status | Description | Additional Parameters |
---|---|---|---|
UnknownChat | 400 | The group or userId provided in chat is not known. |