Documentation
SuperBoard_backup Super Board (Full version)
Documentation
Demo APP
SDK Center
API Center
FAQ
Code Market
Console
Sign Up
Log In
中文站 English
  • Documentation
  • Super Board (Full version)
  • Server API V2
  • Set room permissions

Set room permissions

Last updated:2022-12-21 17:44

Description

Sets the default room permissions on a whiteboard.

  • After the setting, when a user uses a whiteboard in the room, the room is granted with the default permissions on the whiteboard.
  • If user permissions on a whiteboard have been set by referring to Set user permissions, the user permissions prevail.
  • When a room is destructed, room permissions are cleared. After a room is destructed, room permissions need to be set again when users log in to the room with the same room ID.

Request method and endpoint

  • Request method: GET
  • Request endpoint: https://whiteboard-api.zego.im/?Action=SetWhiteboardRoomAuth
  • 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
Room ID.
ModuleAuth[]
Array of Number
Yes
Operation permissions on whiteboards. The value cannot be an empty array.
  • 0: no permission
  • 1: zooming
  • 2: scrolling
Example: ModuleAuth[]=1&ModuleAuth[]=2
GraphicAuth[]
Array of Number
Yes
Operation permissions on diagram elements. The value cannot be an empty array.
  • 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
Example: GraphicAuth[]=32&GraphicAuth[]=2

Sample request

Set the following default room permissions:

  1. Zoom in or out on, scroll, and turn pages on the whiteboard.
  2. Create diagram elements and modify diagram elements created by others.
https://whiteboard-api.zego.im/?Action=SetWhiteboardRoomAuth
&RoomId=RoomName
&ModuleAuth[]=1&ModuleAuth[]=2
&GraphicAuth[]=32&GraphicAuth[]=2
&<Public request parameters>

Response parameters

Parameter Type Description
Code
Number
Return code.
Message
String
Message.
RequestId
String
Unique request ID generated by ZEGO.

Sample response

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

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.
120000103
Failed to set room permissions.
120000105
An empty array is entered for operation permissions.
120000106
Invalid values are set for the operation permissions.
120000301
The room does not exist.
Page Directory
  • Free trial
  • 提交工单
    咨询集成、功能及报价等问题
    电话咨询
    400 1006 604
    Get Consulting
    Scan Wechat QR code