2018-08-07 17:52:03 +02:00
|
|
|
# Get user presence
|
|
|
|
|
2020-04-28 20:00:46 +02:00
|
|
|
{generate_api_description(/users/{email}/presence:get)}
|
2018-08-07 17:52:03 +02:00
|
|
|
|
|
|
|
## Usage examples
|
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{start_tabs}
|
|
|
|
{tab|python}
|
2018-08-07 17:52:03 +02:00
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{generate_code_example(python)|/users/{email}/presence:get|example}
|
|
|
|
|
|
|
|
{tab|curl}
|
2018-08-07 17:52:03 +02:00
|
|
|
|
2019-10-14 08:12:01 +02:00
|
|
|
{generate_code_example(curl)|/users/{email}/presence:get|example}
|
2018-08-07 17:52:03 +02:00
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{end_tabs}
|
2018-08-07 17:52:03 +02:00
|
|
|
|
|
|
|
## Arguments
|
|
|
|
|
|
|
|
{generate_api_arguments_table|zulip.yaml|/users/{email}/presence:get}
|
|
|
|
|
|
|
|
## Response
|
|
|
|
|
|
|
|
#### Return values
|
|
|
|
|
|
|
|
* `presence`: An object containing the presence details for every type
|
|
|
|
of client the user has ever logged into.
|
2019-07-11 12:45:26 +02:00
|
|
|
* `{client_name}` or `aggregated`: the keys for these objects are
|
2018-08-07 17:52:03 +02:00
|
|
|
the names of the different clients where this user is logged in,
|
|
|
|
like `website`, `ZulipDesktop`, `ZulipTerminal`, or
|
|
|
|
`ZulipMobile`. There is also an `aggregated` key, which matches
|
|
|
|
the contents of the object that has been updated most
|
|
|
|
recently. For most applications, you'll just want to look at the
|
|
|
|
`aggregated` key.
|
|
|
|
* `timestamp`: when this update was received; if the timestamp
|
|
|
|
is more than a few minutes in the past, the user is offline.
|
|
|
|
* `status`: either `active` or `idle`: whether the user had
|
|
|
|
recently interacted with Zulip at the time in the timestamp
|
|
|
|
(this distinguishes orange vs. green dots in the Zulip web
|
|
|
|
UI; orange/idle means we don't know whether the user is
|
|
|
|
actually at their computer or just left the Zulip app open
|
|
|
|
on their desktop).
|
|
|
|
|
|
|
|
#### Example response
|
|
|
|
|
|
|
|
A typical successful JSON response may look like:
|
|
|
|
|
|
|
|
{generate_code_example|/users/{email}/presence:get|fixture(200)}
|