Step 2: Create a Batch

You can use the API /addClass (documentation here). This API shall return the ClassID for the created room in the response key _id. You should save this ClassID in your database against your internal BatchID

  1. You should also enable the Public Link (Magic Link). For this use the POST /teacher/editClass API (documentation here) and send the following payload

    Request: 
    POST /teacher/editClass
    {
    	"classId": {UUID of the class},
    	"enableJoinMagicLink": true
    }
  2. Once these steps are done, you can fetch the JoinPublic link using the GET /classes API (documentation here). In this API, the Join Public link can be found in the joinMagicLink key

    GET /user/v2/classes/:classId?full=true
    
    Response:
    {
      status: 200
      data: {
        _id, namespace, pendingRequest, joinedRequest, coTeacherRequests,
        coTeachers, archived, disableReminder, 
        zoomLink: { join_url, mettingEnded, startTime, mettingId }, 
        settings: { disableStudentDiscussions, disableStudentComments, disableScreenCapture, disableWebSdk, lockClassroom, lockAfter, openClassroom, admissionsDisabled, autoAccept, magicJoinTokenConfig: { enabledOn, token } },
        subject, timing, userId: { profilePicture, _id, name, phoneNumber },      
        name, classNumber, timingVersion, 
        schedule: { occurrences, _id, createdAt }, thumbnail, suspendedStudents, 
        createdAt,
        **joinMagicLink**
       }
    }

Last updated