Brief description:
Get a list of unread messages between two users
Endpoint
Method:
Parameter:
| Parameter name | Required | Type | Explain |
|---|---|---|---|
| api_key_token | Yes | string | Your API key |
| to | Yes | integer | A UserID for messages will be listed (UserA) |
| from | Yes | integer | A UserID with to is talking (UserB) |
| markallread | No | integer | 1 if you wanted to mark all messages as read |
Example Response
{
"merchant": "Open Source Social Network",
"url": "http:\/\/dev.opensource-socialnetwork.org\/",
"time_token": 1744001710,
"payload": {
"list": false,
"withuser": {
"guid": 1,
"fullname": "Arsalan Shah",
"username": "arsalanshah",
"is_verified_user": true,
"icon": {
"small": "http:\/\/dev.opensource-socialnetwork.org\/avatar\/arsalanshah\/small\/2bf5d247be47342ce89a231ee477eafa.jpeg?ossn_cache=0c2afb23"
},
"is_online": true
}
},
"code": "100",
"message": "Request successfully executed"
}
Return payload parameter description
| Parameter name | Explain |
|---|---|
| message | contains actual message text |
Remarks
| Code | Explain |
|---|---|
| 201 | OssnMessages component not found |
| 106 | Message text can not be blank |
| 106 | Either to or from is blank |
| 103 | Either user not found |
| 200 | Message send failed |