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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| RoomId | String | Yes | ID of the room where the user permissions are to be queried. |
| UserId[] | Array of String | Yes | IDs 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 | Type | Description |
|---|---|---|
| Code | Number | Return code. |
| Message | String | Message. |
| RequestId | String | Unique request ID generated by ZEGO. |
| Data | Object | If the value is empty, no permission on whiteboards has been set for the room. |
| └ UserId | String | User ID. |
| └ ModuleAuth[] | Array of Number | Operation permissions on whiteboards.
|
| └ GraphicAuth[] | Array of Number | Operation permissions on 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 code | Description |
|---|---|
| 120000001 | Signature authentication failed. |
| 120000002 | Incorrect input parameters. |
| 120000102 | Failed to query user permissions. |
| 120000107 | The number of users to be queried exceeds the upper limit. |
| 120000301 | The room does not exist. |

