Documentation
WhiteBoard Collaborative Whiteboard
Documentation
Demo APP
SDK Center
API Center
FAQ
Code Market
Console
Sign Up
Log In
中文站 English
  • Documentation
  • Collaborative Whiteboard
  • Server APIs
  • Set Whiteboard Permissions of the Room

Set Whiteboard Permissions of the Room

Last updated:2021-04-25 20:24

1 Description

Call this interface to set the default whiteboard permission of the room.

  • After the setting is successful, when the user in the current room uses the whiteboard, the default permission of the room set this time shall prevail.
  • If user permission is set alone, this user uses the whiteboard according to the user authority.
  • When the room is destroyed, the room permissions will also be cleared. After the room is destroyed, the user subsequently logs in to the room with the same RoomId. If you want to use the room permission function, you also need to reset the room permission.

Call frequency limit:

  • Formal environment: 50 times/sec
  • Test environment: 1 time/sec

2 Request Method and Endpoint

  • Request method: GET
  • Request endpoint: https://whiteboard-api.zego.im/?Action=SetWhiteboardRoomAuth
  • Transmission protocol: HTTPS

3 Request Parameters

The following request parameter list only lists the interface request parameters. For the list of public parameters, please refer to API Call Method - Public Request Parameters.

Parameters Type Required Description
RoomId String Yes The room ID that needs to be set.
ModuleAuth[] Array of Number Yes

A set of whiteboard operation permissions. It is not allowed to pass an empty array.

  • 0: No permission
  • 1: Allow zooming of the whiteboard
  • 2: Allow scrolling of the whiteboard
Example: ModuleAuth[]=1&ModuleAuth[ ]=2
GraphicAuth[] Array of Number Yes

Graphic element operation permission collection, it is not allowed to pass an empty array.

  • 0: No operation authority
  • 2: Allow to modify the primitives created by others
  • 4: Allow to erase the primitives created by others
  • 8: Allow to move the graphic elements created by others
  • 16: Allow to clear the graphic elements
  • 32: Allow to create the graphic elements
Example: GraphicAuth[]=32&GraphicAuth[]=2

4 Request Example

The following is an example of a request for the room permission interface. Only the interface request parameters are listed in the request example. For public request parameters, please refer to the request example in API Call Method - Public Request Parameters.

Set the default permissions of the room as:

  1. The whiteboard can be zoomed and scrolled.
  2. You can create graphic elements and modify other people’s graphic elements.
https://whiteboard-api.zego.im/?Action=SetWhiteboardRoomAuth
&RoomId=RoomName
&ModuleAuth[]=1&ModuleAuth[]=2
&GraphicAuth[]=32&GraphicAuth[]=2
&<Public request parameters>

5 Response Parameters

Parameters Type Description
Code Number Return code.
Message String Details.
RequestId String The unique request ID generated by ZEGO.

6 Response Example

{
    "Code":0,
    "Message":"SUCCESS",
    "RequestId":"2237080460466033406"
}

7 Return Code

Return Code Description
0 The request was successful.
120000001 Signature authentication failed.
120000002 The input parameter is incorrect.
120000103 Failed to set room permissions.
120000105 The permission set passed an empty array and failed.
120000106 An illegal permission number is set in the permission set.
120000301 The room does not exist.
Page Directory
  • Free trial
  • 提交工单
    咨询集成、功能及报价等问题
    电话咨询
    400 1006 604
    Get Consulting
    Scan Wechat QR code