logo
On this page

Query user permissions


Description

You can call this API to query the whiteboard permissions of users, with a maximum of 10 users' permissions allowed to be queried at a time. If the permissions of the queried users have not been granted, the server will not return the permission data for those users.

Request method and endpoint

  • Request method: GET
  • Request endpoint: https://whiteboard-api.zego.im/?Action=GetWhiteboardUserAuth
  • Protocol: HTTPS
  • Rate limit: 50 requests/second (test environment: 1 request/second)

Request parameters

Listed below are the parameters specific to this request. For the complete list of public request parameters, see Accessing Server APIs - Public parameters.

ParameterTypeRequiredDescription
RoomIdStringYesID of the room where the user permissions are to be queried.
UserId[]Array of StringYesIDs of users whose permissions are to be queried. Permissions of a maximum of 10 users can be queried at a time.

Sample request

https://whiteboard-api.zego.im/?Action=GetWhiteboardUserAuth
&RoomId=RoomName
&UserId[]=jack&UserId[]=tom
&<Public request parameters>

Response parameters

Parameter

TypeDescription
CodeNumberReturn code.
MessageStringMessage.
RequestIdStringUnique request ID generated by ZEGO.
DataObjectIf the value is empty, no permission on whiteboards has been set for the room.
└ UserIdStringUser ID.
└ ModuleAuth[]Array of NumberOperation permissions on whiteboards.
  • 0: no permission
  • 1: zooming
  • 2: scrolling
└ GraphicAuth[]Array of NumberOperation permissions on diagram elements.
  • 0: no permission
  • 2: modifying diagram elements created by other users
  • 4: erasing diagram elements created by other users
  • 8: moving diagram elements created by other users
  • 16: deleting all diagram elements
  • 32: creating diagram elements

Sample response

{
    "Code":0,
    "Message":"SUCCESS",
    "RequestId":"2237080460466033406",
    "Data":[
        {
            "UserId":"jack",
            "ModuleAuth":[1,2],
            "GraphicAuth":[32,2]
        },
        {
            "UserId":"tom",
            "ModuleAuth":[1,2],
            "GraphicAuth":[32]
        }
    ]
}

Return codes

Listed below are the return codes related to this API. For the complete list of return codes, see Return codes.

Return codeDescription
120000001Signature authentication failed.
120000002Incorrect input parameters.
120000102Failed to query user permissions.
120000107The number of users to be queried exceeds the upper limit.
120000301The room does not exist.

Previous

Query room permissions

Next

Return codes

On this page

Back to top