Subscribe to User Last Activity API
Overview
Section titled “Overview”wss user_last_activity_subscribe
The user_last_activity_subscribe request will allow you to subscribe to another user in order to track their activity status in real time.
Request Parameters
Section titled “Request Parameters”| Name | Type | Description |
|---|---|---|
id | string | User ID |
You can only have one subscription, which means that the next one will cancel the previous one.
Response Fields
Section titled “Response Fields”| Name | Type | Description |
|---|---|---|
last_activity | object | Last user activity by UID |
Example
Section titled “Example”{ "request": { "user_last_activity_subscribe": { "id": "UID1" }, "id": "RequestId" }}{ "response": { "id": "RequestId", "last_activity": { "UID1": 0 | <last_activity-time> } }}Once that user will go offline/online, you will be receiving his/her last activity status:
"last_activity": { "UID1": 0 | num_of_seconds}See Also
Section titled “See Also” SAMA chat server API: Activities I think everyone has had a conversation where your opponent didn’t answer for a long time, and you didn’t know whether they were...