Appearance
Get Message
GET/public/chat/{chatId}/messageRetrieve a paginated list of messages within a specific chat, including sender, content, and timestamps.
Endpoint Details
- Authentication: Basic Auth (
Authorization: Basic Base64(AccessKey:SecretKey)) - Access Tier: Gold+
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chatId | string | Yes | The unique identifier of the chat conversation. |
page | number | Yes | Page number, starting from 1. |
limit | number | Yes | Maximum items per page. |
Example Request
bash
curl -X GET "https://api.repliz.com/public/chat/680affa5ce12f2f72916f67e/message?page=1&limit=20" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"javascript
import axios from 'axios';
const chatId = '680affa5ce12f2f72916f67e';
const response = await axios.get(`https://api.repliz.com/public/chat/${chatId}/message`, {
params: {
page: 1,
limit: 20
},
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY'
}
});
console.log(response.data);javascript
const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const chatId = '680affa5ce12f2f72916f67e';
const response = await fetch(`https://api.repliz.com/public/chat/${chatId}/message`, {
headers: {
'Authorization': `Basic ${credentials}`
}
});
const data = await response.json();
console.log(data);Response
json
{
"docs": [
{
"_id": "69c635057beca0735544787c",
"chatId": "69c627d16f291e00d98b5754",
"messageId": "m_ab2lk1uLlqxSwS_E6ufOaaDllBn-ZQje_xFEJPRwKTzIXkUK_ykxcfo9GDvv26nfY0g-1zNA7K_hcSKuUZ18XA",
"senderId": "113958387982006",
"type": "text",
"status": "unread",
"isFromMe": true,
"text": "Hello",
"accountId": "69686c4c41ec8ac5117c8929",
"userId": "6879b98097fc8c8a78d1d4c1",
"createdAt": "2026-03-27T07:43:00.416Z",
"updatedAt": "2026-03-27T07:43:00.416Z",
"__v": 0,
"id": "69c635057beca0735544787c"
},
{
"_id": "69c627d16f291e00d98b5755",
"userId": "6879b98097fc8c8a78d1d4c1",
"chatId": "69c627d16f291e00d98b5754",
"accountId": "69686c4c41ec8ac5117c8929",
"messageId": "m_Nxw6A8mCd-4mNNkdhABNW6DllBn-ZQje_xFEJPRwKTy1oQ3eV_8gXHjUz-BMHBMo0_SEj701uyeU0bGZVPQByA",
"__v": 0,
"createdAt": "2026-03-27T06:46:07.459Z",
"isFromMe": false,
"senderId": "6793729447315239",
"status": "sent",
"text": "This is Me",
"type": "text",
"updatedAt": "2026-03-27T06:46:07.459Z",
"id": "69c627d16f291e00d98b5755"
}
],
"totalDocs": 2,
"limit": 20,
"totalPages": 1,
"page": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": false,
"prevPage": null,
"nextPage": null
}json
{
"code": 401,
"message": "unauthorized"
}