Skip to content

Agora Edu Cloud Service

srs888001 edited this page Jul 21, 2020 · 6 revisions

其他语言版本:简体中文

Overview

Designed for developers who are not good at back end development, Agora Edu Cloud Service enables managing the states of classrooms and users and notifying all the users in the classroom of state changes on the back end. The functions that Agora Edu Cloud Service supports include:

  • Create a classroom.
  • Control the number of students and teachers in the classroom.
  • Notify all the other users in the classroom when a user entry or leave the classroom.
  • Manage the states of a class (class begins and ends).
  • Generate and renew the RTC Token, RTM Token, and Whiteboard Token.
  • Mute or unmute the audio, video, and text of a specified user or all users.
  • Manage the states of screen sharing.
  • Manage the states of students when they "raise their hands" to interact with the teacher in an online lecture hall.

You can use Agora Edu Cloud Service, together with the Agora RTC SDK, the Agora RTM SDK, Agora Cloud Recording and the third-party Netless Whiteboard SDK to quickly implement online interactive teaching scenarios.

Get started

Enter a classroom

Call the following method to enter a classroom:

POST /edu/v1/apps/{appId}/room/entry

Pay attention to the following parameters:

Request parameter Description
appId The App ID issued by Agora.
roomName The name of a classroom, which will be displayed throughout the class.
roomUuid The unique identifier of a classroom in your classroom management system. Users passing in the same roomUuid will be assigned to the same classroom.
userName The name of a user, which will be displayed throughout the class.
userUuid The unique identifier of a user in your user management system.
role The user role:
  • 1: Teacher
  • 2: Student
  • type The classroom type:
  • 0: One-to-one Online Classroom
  • 1: Small Classroom
  • 2: Lecture Hall
  • Response parameter Description
    roomId The room ID.
    userToken The user token, which is the unique identifier of a user in the classroom. You need to pass in userToken in the following operations in the classroom.

    Initialize a classroom

    Call the following method to get the information of the classroom (room name, room type, whiteboard ID, whiteboard token, class state, the number of users in the room, and the number of co-hosts in the room) and the information of users (whether can send message, whether can send audio and video, and whether can draw on the whiteboard). Your client can use these information to initialize a classroom.

    GET /edu/v1/apps/{appId}/room/{roomId}

    Pay attention to the following parameters:

    Request parameters Description
    appId The App ID issued by Agora.
    roomId The room ID, which is returned after calling the entry room method.
    token The user token, which is returned after calling the entry room method. Pass in token in the header.
    Response parameters Description
    room The information of the current classroom, including the room name, room type, class state, the number of users in the room. Pay attention to roomId that this method returns. You can use this parameter for customization.
    user The information of the current user, including the user name, user role, rtcToken, rtmToken, and the privileges. Pay attention to userId that this method returns. You can use this parameter for customization.

    During the class

    During the class, you can call the following two methods to update the classroom information (class state, whether to mute all, and whether to lock the whiteboard) and update the user information (whether can send message, whether can send audio and video, and whether can draw on the whiteboard). After updating the information, the back end sends an RTM channel message to all the users in the classroom.

    change room info

    POST /edu/v1/apps/{appId}/room/{roomId}

    You need to pass in appId, roomId, and token in this method.

    change user info

    POST /edu/v1/apps/{appId}/room/{roomId}/user/{userId}

    You need to pass in appId, roomId, token, and userId in this method.