Large Classes
  • Overview
  • Demo App
  • Sample Codes
  • SDK Integration
  • Teacher-Side Implementation
  • Student-Side Implementation
  • GoClass Backend Service
  • Error Codes
  • Documentation
  • Large Classes
  • GoClass Backend Service
  • Leave a Classroom

Leave a Classroom

Last updated:2022-03-22 13:06

1 Description

Call leave_room to leave the classroom in the middle of a class. Both teachers and students are allowed to call this API.

API call frequency limit: 10 times/second.

When all members have left the classroom, the classroom will automatically be destroyed after 15 minutes. Users can call log in to the classroom again before it is destroyed. Users can call login_room to log in to the classroom again before it is destroyed.

2 API Prototype

  • Request method: POST
  • Request endpoint: /edu_room/leave_room
  • Transmission protocol: application/json

3 Request Parameters

Parameter Type Mandatory Example Description
room_id String Yes "123456" Room ID of the classroom, a string with a maximum of 9 characters and contains only digits.
uid Int64 Yes 171171717 User ID.
room_type Int32 No 2 Room type.

Valid values :
  • 1: Small class
  • 2: Large class
Defaults to "Small class" if not specified.

4 Request Example

{
  "uid":171171717,
  "room_id":"123456",
  "room_type": 2
}

5 Response Parameters

None.

6 Response Example

{
  "ret": {
    "code": 0,
    "message": "succeed"
  }
}

7 Return Codes

Return code Description
10005 Please log in to the classroom first.
10006 The classroom does not exist.
Page Directory