Query user status
https://api.agora.io/dev/v1/channel/user/property/{appid}/{uid}/{channelName}Use this endpoint to get the status of a specified user. It checks whether the user is in the specified channel and, if present, returns the user's role and the time they joined.
Request
The request URL and request body is case-sensitive. All requests must use HTTPS.
Request header
Content-Type:application/json- The request header must contain the
Authorizationfield. For details, see RESTful authentication.
Path parameters
The App ID of the project. You can get it through one of the following methods:
- Copy from the Agora Console
- Call the Get all projects API, and read the value of the
vendor_keyfield in the response body.
The user ID. This parameter does not support string user accounts; use the integer user ID only.
The channel name.
Response
A 200 status code indicates success. The response body contains the following parameters:
OK
- success boolean
The state of this request:
true: Success.false: Reserved for future use.
- data object
User statistics.
Show propertiesHide properties
- in_channel boolean
Whether the user is in the channel. When
false, no other fields are returned. - uid number
The user ID.
- join number
The Unix timestamp (in seconds) of when the user joined the channel.
- role number
The role of the user in the channel:
0: Unknown user role.1: User, in a communication channel.2: Host, in a live broadcast channel.3: Audience, in a live broadcast channel.
- platform number
The platform of the user's device. Common values include:
1: Android2: iOS5: Windows6: Linux7: Web8: macOS0: Others
If the status code is not 200, the request fails. See the message field in the response body for the reason for this failure. Refer to Response status codes for details.