Query user status

Updated

Retrieves the status of a specified user in a channel.

GET
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.

Path Parameters

appidstring
Required

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_key field in the response body.
uidnumber
Required

The user ID. This parameter does not support string user accounts; use the integer user ID only.

channelNamestring
Required

The channel name.

Request

  • The request URL and request body is case-sensitive. All requests must use HTTPS.

  • Content-Type: application/json

  • The request header must contain the Authorization field. For details, see RESTful authentication.

Response

  • A 200 status code indicates success. The response body contains the following parameters:

  • 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.

Response Body

A 200 status code indicates success. The response body contains the result of the request.

successboolean

The state of this request:

  • true: Success.
  • false: Reserved for future use.
dataobject

User statistics.

Authorization

This endpoint requires authentication.

basicAuth

Request examples

curl --request GET \  --url https://api.sd-rtn.com/dev/v1/channel/user/property/<appid>/<uid>/<channelName> \  --header 'Accept: application/json' \  --header 'Authorization: Basic <your_base64_encoded_credentials>'

Response example

{  "success": true,  "data": {    "join": 1640330382,    "uid": 2845863044,    "in_channel": true,    "platform": 7,    "role": 2  }}