This method sends a heartbeat signal to the user. We call it on the user's side of the site to track user status.
This method should be called every minute.
POST https://api.dashly.app/users/{id}/setpresence
Dashly ID (our ID) should be used as {id}.
Authentification parameters.
| Parameter | Type | Description |
|---|---|---|
presence |
string | Status: online or idle |
current_page |
Optional[string] | Name of requesting page |
current_url |
Optional[string] | URL of requesting page |
app |
Optional[ID] | ID of requesting application. Default: calculated based on access token. |
The user can be online from different devices or browsers.
current_page and current_url fields are used to track users current presence on web-site.
Values of these fields are used in chat-bots and automessage filters.
The user is considered(idle), if he does not show any activity for two minutes (does not press keys, scroll, move the mouse, etc.).
data field will be empty.
meta field will have standart value.
{
"meta": {
"status": 200
},
"data": {
}
}
curl -X POST \
--data-urlencode 'presence=online' \
--data-urlencode 'session=dksjovtd9e1nz6hpbk2adkj1fwwfwzfd' \
-H "Authorization: Token XXX" \
"https://api.dashly.app/users/2137216/setpresence"