Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
50 lines (36 loc) · 1.8 KB

File metadata and controls

50 lines (36 loc) · 1.8 KB

Get Specific User's Presence

HTTP MethodURLRequires Auth
GET/api/v1/users.getPresenceyes

Query Parameters

KeyExample ValueDescription
userId* or username*BsNr28znDkG8aeo7W or test

The ID or username of the user.

If not provided, the user who sending the request is retrieved.

Example Call

With userId:

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

With username:

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

With no query parameter:

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

Example Response

{
  "presence": "offline",
  "success": true
}

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