URL: https://api.stringee.com/v1/chat/messages
HTTP method: GET
Custom HTTP GET header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see REST API Authentication
GET params:
Field | Type | Require | Description |
---|---|---|---|
conv_id | String | No | ID of a conversation |
page | Int | No | Default page = 1 |
limit | Int | No | Default limit = 10; max = 100 |
created_from | Int | No | Timestamp in milliseconds |
created_to | Int | No | Timestamp in milliseconds |
Sample request
a) Get messages with default:
GET https://api.stringee.com/v1/chat/messages
X-STRINGEE-AUTH: json_web_token
b) Get conversations with params:
GET https://api.stringee.com/v1/chat/messages?conv_id=conv-vn-1-KGOMUR0QI2-1601526977467
X-STRINGEE-AUTH: json_web_token
Sample response
{
"r": 0,
"message": "Load message(s) success",
"data": {
"currentPage": 1,
"limit": 20,
"totalPages": 3709,
"totalMessages": 74173,
"messages": [
{
"id": "msg-vn-1-KGOMUR0QI2-1601527007314",
"localDbId": "",
"accountSid": "ACab9b9bcf6391c6af9fe1663c729e3a6b",
"conversation": "conv-vn-1-KGOMUR0QI2-1601526978161",
"seq": 6,
"user": "ACFICEEHI3",
"type": 100,
"content": "{\"groupName\":\"QURLS0FY\",\"removedBy\":\"ACFICEEHI3\",\"type\":2,\"removedInfo\":{\"avatarUrl\":\"https:\/\/test5-api.stringeex.com\/ACFICEEHI3\/FQWWQQYMCY-1577342668840.jpg\",\"displayName\":\"Eric :))\",\"user\":\"ACFICEEHI3\"},\"participants\":[{\"avatarUrl\":\"https:\/\/test5-api.stringeex.com\/ACFICEEHI3\/FQWWQQYMCY-1577342668840.jpg\",\"displayName\":\"Eric :))\",\"user\":\"ACFICEEHI3\"}]}",
"created": 1602059850868,
"status": 0,
"deletedByUsers": null,
"project_id": 25,
"user_type": 0,
"channel_type": 1
}
]
}
}