Fuselage
Powered By GitBook
Get User's Presence
Gets a user's presence if the query string userId or username is provided, otherwise it gets the callee's.
URL
Requires Auth
HTTP Method
/api/v1/users.getPresence
yes
GET

Query Parameters

Argument
Example
Required
Description
userId or username
BsNr28znDkG8aeo7W
Optional
The id or username of the user. If not provided, the auth user is updated.

Other Users Example Call - Via userId

1
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
2
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
3
http://localhost:3000/api/v1/users.getPresence?userId=BsNr28znDkG8aeo7W
Copied!

Example Result

1
{
2
"presence": "offline",
3
"success": true
4
}
Copied!

Other Users Example Call - Via username

1
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
2
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
3
http://localhost:3000/api/v1/users.getPresence?username=test
Copied!

Example Result

1
{
2
"presence": "offline",
3
"success": true
4
}
Copied!

Self Example Call

1
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
2
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
3
http://localhost:3000/api/v1/users.getPresence
Copied!

Example Result

1
{
2
"presence": "offline",
3
"connectionStatus": "offline",
4
"lastLogin": "2016-12-08T18:26:03.612Z",
5
"success": true
6
}
Copied!

Change Log

Version
Description
0.49.0
Updated to support userId or username
0.48.0
Renamed to users.getPresence
0.35.0
Added as user.getPresence
Last modified 6mo ago