Brief description:
Endpoint
Method:
Parameter:
| Parameter name | Required | Type | Explain |
|---|---|---|---|
| api_key_token | Yes | string | Your API key |
| guid | Yes | integer | A UserID for messages will be listed (UserA) |
| to | Yes | integer | A UserID with user is messaging (UserB) |
| markallread | No | integer | 1 if you wanted to mark all messages viewed to UserA (not UserB) else leave it 0 |
| offset | No | integer | - |
| Example Response |
{
"merchant": "Open Source Social Network",
"url": "http:\/\/dev.opensource-socialnetwork.org\/",
"time_token": 1744001277,
"payload": {
"list": [
{
"id": 5,
"message_from": 2,
"message_to": 1,
"message": "Ok sir testing",
"viewed": "1",
"time": 1743531459,
"is_deleted_from": "",
"is_deleted_to": ""
},
{
"id": 7,
"message_from": 2,
"message_to": 1,
"message": "File Attachment",
"viewed": "1",
"time": 1743593492,
"is_deleted_from": "",
"is_deleted_to": "",
"attachment_guid": "1348",
"attachment_name": "screencapture-2025-04-01-12-40-48",
"type_of_attachment": "file",
"attachment_url": "http:\/\/dev.opensource-socialnetwork.org\/messages_attachment_view\/1348\/screencapture-2025-04-01-12-40-48.pdf"
},
....
......
],
"withuser": {
"guid": 2,
"fullname": "Test User",
"username": "testuser",
"is_verified_user": true,
"icon": {
"small": "http:\/\/dev.opensource-socialnetwork.org\/avatar\/testuser\/small\/4e6e4ad87ecf05ce879d9d1e95964a99.jpeg?ossn_cache=0c2afb23",
"smaller": "http:\/\/dev.opensource-socialnetwork.org\/avatar\/testuser\/smaller\/1b80a3837602f864c8238152e5773e4b.jpeg?ossn_cache=0c2afb23"
},
"is_online": false
},
"count": 8,
"offset": false
},
"code": "100",
"message": "Request successfully executed"
}
Return payload parameter description
| Parameter name | Explain |
|---|---|
| list | Contains all messages or it will contain false |
| is_deleted | Existing only if message is deleted, value 1 |
| is_online | shows if user is online or not |
| count | total messages |
| offset | current pagination number |