Create a new meeting room. Only switch
and admin
roles can create meeting rooms.
/api/room/do_add POST {
"name" : "Urology: Dr. Li's Online Consultation" ,
"description" : "Dr. Li's Morning Consultation"
}
Parameter Meaning Type Required Default value Description HEADERS
Authorization After logging in, the server returns an Authorization token. string Y Bearer Used for authentication BODY
name string Y Meeting room name description string N Meeting room description
{
"status" : 1 ,
"message" : "" ,
"data" : {
"roomId" : "xp4z6dani" ,
"name" : "Urology: Dr. Li's Online Consultation" ,
"description" : "Dr. Li's Morning Consultation" ,
"createdAt" : "2024-06-23T06:00:52.330Z" ,
"host" : {
"id" : "1" ,
"displayName" : "Chen Xiaoling"
}
}
}
Parameter Meaning Type Existed Default value Description BODY
status response status string Y 0: fail 1: success 2: warning message message string Y Error messages should be shown when there are errors. data Return Information object Y Room information roomId
string Y Created meeting room ID name
string Y Meeting room name description
string Y Meeting room description createdAt
string Y Creation time data.host Return host info object Y id
string Y Host ID (i.e., userId
) displayName
string Y Host display name carrierId
string Y Host's Carrier ID carrierAddress
string Y Host's Carrier Address
Code Status Error Message 200
1 success 0 error message 404
Resource Not Found 403
Access to the requested resource is not allowed
Close the specified meeting room. admin
can close any meeting room, switch
can only close the meeting room where they are the host.
/api/room/do_del POST {
"roomId" : "a37fsupzg"
}
Parameter Meaning Type Required Default value Description HEADERS
Authorization After logging in, the server returns an Authorization token. string Y Bearer Used for authentication BODY
roomId string Y Meeting room ID
{
"status" : 1 ,
"message" : "Room closed" ,
"data" : null
}
Parameter Meaning Type Existed Default value Description BODY
status response status string Y 0: fail 1: success 2: warning message message string Y Error messages should be shown when there are errors. data Return Information object Y
Code Status Error Message 200
1 Room closed 0 error message 0 Room not found 2 Failed to publish MQTT message 404
Resource Not Found 403
Access to the requested resource is not allowed
Get a list of all meeting rooms.
👉 This API is for ease of development and should not be included in the SDK. Instead, it should be integrated by third-party applications to obtain basic room information. /api/room/get_list POST Parameter Meaning Type Required Default value Description HEADERS
Authorization After logging in, the server returns an Authorization token. string Y Bearer Used for authentication BODY
status
(number): 1 indicates success, 0 indicates failure, 2 indicates warningmessage
(string): Prompt messagedata
(array) : List of meeting rooms, each room contains roomId
, name
, description
, createdAt
, host
HTTP Status Code Status Message Description 200 1 "" Request successful
Get detailed information about the meeting room. The information returned varies depending on the user's role. Hosts and administrators can see all information, participants can see information about other participants but not about applicants. Applicants can only see basic information about the room and the host. Non-room members can only see basic information about the room and the host.
/api/room/get_info POST {
"roomId" : "a37fsupzg"
}
Parameter Meaning Type Required Default value Description HEADERS
Authorization After logging in, the server returns an Authorization token. string Y Bearer Used for authentication BODY
roomId string Y Meeting room ID
status
(number): 1 indicates success, 0 indicates failure, 2 indicates warningmessage
(string): Prompt messagedata
(object): roomId
(string): Meeting room IDname
(string): Meeting room namedescription
(string): Meeting room descriptioncreatedAt
(string): Creation timestatus
(string): Meeting room status, host_joined
or created
host
: id
(string): Host IDdisplayName
(string): Host display namecarrierId
(string): Host's Carrier IDcarrierAddress
(string): Host's Carrier Addressparticipants
(array): List of participants, each participant contains id
, displayName
, joinedAt
applicants
(array): List of applicants, each applicant contains id
, displayName
, appliedAt
HTTP Status Code and Return Message :
HTTP Status Code Status Message Description 200 1 "" Request successful 200 0 "Room not found" Room not found 403 0 "Forbidden" Insufficient permissions
Apply to join the specified meeting room. After a successful application, return the basic information of the room and the host.
/api/room/participants/do_add POST Parameter Meaning Type Required Default value Description HEADERS
Authorization After logging in, the server returns an Authorization token. string Y Bearer Used for authentication BODY
roomId string Y Meeting room ID carrierId string Y Applicant's Carrier ID carrierAddress string Y Applicant's Carrier Address
status
(number): 1 indicates success, 0 indicates failure, 2 indicates warningmessage
(string): Prompt messagedata
(object, optional): Basic room information and host information roomId
(string): Meeting room IDname
(string): Meeting room namedescription
(string): Meeting room descriptioncreatedAt
(string): Creation timestatus
(string): Meeting room status, host_joined
or created
host
: id
(string): Host IDdisplayName
(string): Host display nameHTTP Status Code and Return Message :
HTTP Status Code Status Message Description 200 1 "Application to join room submitted" Request successful 200 0 "Already a participant, an applicant, or host already joined" Already a participant, applicant, or host already joined 403 0 "Forbidden" Insufficient permissions 200 0 "Room not found" Room not found 200 2 "Failed to publish MQTT message" Failed to publish MQTT message
Leave the specified meeting room. The host leaving will close the meeting room. Hosts and administrators can remove participants and provide a reason for removal. If an applicant uses this method, it is equivalent to withdrawing the application to join the meeting room.
/api/room/participants/do_del POST Parameter Meaning Type Required Default value Description HEADERS
Authorization After logging in, the server returns an Authorization token. string Y Bearer Used for authentication BODY
roomId string Y Meeting room ID participantId string ID of the participant to be removed, not needed if leaving by oneself message string Y Reason for removal
status
(number): 1 indicates success, 0 indicates failure, 2 indicates warningmessage
(string): Prompt messagedata
(object, optional): Updated room informationHTTP Status Code and Return Message :
HTTP Status Code Status Message Description 200 1 "Successfully left the room" Successfully left the room 200 0 "Not a participant or applicant in the room" Not a participant or applicant in the room 200 0 "Participant not found in the room" Participant not found 403 0 "Forbidden" Insufficient permissions 200 1 "Host left and room closed" Host left and room closed 200 2 "Failed to publish MQTT message" Failed to publish MQTT message
Handle requests to join the meeting room. Only hosts and administrators can handle applications.
/api/room/participants/handle_request POST Parameter Meaning Type Required Default value Description HEADERS
Authorization After logging in, the server returns an Authorization token. string Y Bearer Used for authentication BODY
roomId string Y Meeting room ID applicantId string Y Applicant ID accept boolean Y Whether to accept the application message string Reason for rejection
status
(number): 1 indicates success, 0 indicates failure, 2 indicates warningmessage
(string): Prompt messagedata
(object, optional): Updated room informationHTTP Status Code and Return Message :
HTTP Status Code Status Message Description 200 1 "Request handled" Request handled 200 0 "Applicant not found" Applicant not found 403 0 "Forbidden" Insufficient permissions 200 0 "Room not found" Room not found 200 2 "Failed to publish MQTT message" Failed to publish MQTT message
Update the information of the meeting room. Only hosts and administrators can update the information of the meeting room.
/api/room/update_info POST Parameter Meaning Type Required Default value Description HEADERS
Authorization After logging in, the server returns an Authorization token. string Y Bearer Used for authentication BODY
roomId string Y Meeting room ID name string Y New meeting room name description string Y New meeting room description carrierId string Y Host's new Carrier ID carrierAddress string Y Host's new Carrier Address
status
(number): 1 indicates success, 0 indicates failure, 2 indicates warningmessage
(string): Prompt messagedata
(object, optional): Updated room informationHTTP Status Code and Return Message :
HTTP Status Code Status Message Description 200 1 "Room info updated" Room information updated 403 0 "Forbidden" Insufficient permissions 200 0 "Room not found" Room not found 200 2 "Failed to publish MQTT message" Failed to publish MQTT message
Host publishes custom MQTT messages to everyone, which can be used to publish application-specific messages such as starting recording, activating whiteboard, etc.
api/room/custom_event POST Parameter Meaning Type Required Default value Description HEADERS
Authorization After logging in, the server returns an Authorization token. string Y Bearer Used for authentication BODY
roomId string Y Meeting room ID eventMessage string Y Custom message to be published
status
(number): 1 indicates success, 0 indicates failure, 2 indicates warningmessage
(string): Prompt messageHTTP Status Code and Return Message :
HTTP Status Code Status Message Description 200 1 "Custom event published" Message published 403 0 "Forbidden" Insufficient permissions 200 2 "Failed to publish MQTT message" Failed to publish MQTT message 200 0 "Room not found" Room not found