Our REST API makes it easy to integrate LearnCube's Virtual Classrooms with other systems.
Seamless integration
Class logs & reports
WebRTC (no flash or downloads)
Highly scalable
Our REST API makes it easy to integrate with existing systems
Reliable & highly scalableWe manage all the infrastructure for you including automatic routing to the closest server in our global network to minimize latency. Host unlimited concurrent classes
Fully featuredUsers love our virtual classroom & online whiteboard designed specifically for teaching online
Class logs & reportingClass reports & attendance, teacher ratings, student feedback, identify issues automate support
Teacher focused
Designed for teachers: no training, intuitive and simple to use
Real-time logs and dashboard
Monitor class logs and get instant alerts for known issues from a single dashboard
In-built troubleshooter
Allow users to check browser, hardware and internet speed to minimize tech support
1) Pass a unique token and a user_id as URL parameters to a custom endpoint on our server
URL |
HTTPS://{LEARNCUBE_ENDPONT}/classv3/
{LEARNCUBE_ENDPONT} can be a subdomain on learn-cube.com or a custom domain pointing to our server. The domain is also used to authenticate the POST |
Parameters | token: [alphanumeric] Unique token from your system user_id : [alphanumeric] User ID from your system |
Example |
HTTPS://{LEARNCUBE_ENDPONT}/classv3/?token=ABC123&user_id=111
Link the URL up to your existing system. (As a href or button) |
2) We respond with a connect_lesson request to your server to validate the token and user_id
Method | POST |
URL | HTTPS://{YOUR_SERVER}/ |
Parameters | request: “connect_lesson” token: [alphanumeric] Same as received in the URL in step 1 user_id: [alphanumeric] Same as received in the user_id in step 1 |
Example | HTTPS://{YOUR_SERVER}/virtualclassroom/?request=connect_lesson&token=ABC123&user_id=111 |
3) Your server responds via JSON verifying if the class should start and returns the users parameters.
Parameters | status: [true or false] is_tutor: [true or false] Used to identify if user is a Tutor, for placement of video and to define classroom functions only the Tutor has access to. id: [alphanumeric] Same as received in the user_id in step 1 full_name: [alphanumeric] User's Name for use in chat and profile avatar: [alphanumeric] Url of the user's avatar/profile image. i.e https:\/\domain.com\/images\/avatar.png record: [true or false] Records MP4 of video streams *Beta Feature message: : If status is false you can send an optional message with the reason the class failed, this can be shown in the Virtual classroom UI |
Format | JSON Content-Type: application/json;charset=UTF-8 |
Successful Response |
Example: Request: {"request":"connect_lesson","token":"1235678","user_id":"111"} Response: {"status":true, "is_tutor":false, "id":111,"full_name":"John Smith", "avatar":"https:\/\domain.com\/images\/avatar.png", "record":false} |
Error Response |
Example: Request: {"request":"connect_lesson","token":"1235678","user_id":"111"} Response: {"status":false, "message":"Class not allowed, student has no credit" } |
The Virtual Classroom detects teacher and student presence in real-time, the "start_lesson" command is sent only when both the teacher and at least one student have clicked the “Start Class” button. This allows the class time be tracked accurately from when both a teacher and student are present in the class.
Method | POST |
URL | HTTPS://{YOUR_SERVER}/ |
Parameters | request: "start_lesson" token: [alphanumeric] Same as received in the URL in step 1 |
Example | HTTPS://{YOUR_SERVER}/virtualclassroom/?request=start_lesson&token=ABC123 |
Format | JSON Content-Type: application/json;charset=UTF-8 |
Successful Response |
Example: Request: {"request":"start_lesson","token":"ABC123"} Response: {"status":true} If “status:true” is returned the class is set as “started” and connect the video stream between the student and teachers, once the video streams are connected and the class timer starts. |
Error Response |
Example: Request: {"request":"start_lesson","token":"ABC123"} Response: {"status":false, "message":"Class not allowed" } If “status:false” teacher and student can not see each other and an optional "message" is shown in th UI. |
Virtual classes are ended by pressing the "End Class" button this is considered a "clean_end", if the class disconnects for any other reason (Internet drop, browser crash etc) we record this as a "crash_lesson".
If a "crash_lesson" is sent the student or teacher have 60 seconds to rejoin the class, if they successfully rejoin the class resumes and the class time/counter continues.
If a user resumes a "crash_lesson" and then the class is later ended (by pressing the “End Class” button) the "end_lesson" command will also be sent. (Resulting in 2 or more “time” parameters being sent, these should be added together to give the total class time). In the API Log we aggregate total class time for each token.
The end_lesson call will not be sent unless a start_class was sent prior, so if a student or teacher enter a Virtual Classroom but leave/end the class without pressing the "Start Class" button no end_lesson call will be sent.
Method | POST |
URL | HTTPS://{YOUR_SERVER}/ |
Format | JSON Content-Type: application/json;charset=UTF-8 |
Parameters | request: "end_lesson" or crash_lesson token: [alphanumeric] Same as received in the URL in step 1 time: [integer] Class duration in seconds, the time from “start_class” call, until "end_lesson" call) |
Example | HTTPS://{YOUR_SERVER}/virtualclassroom/?request=end_lesson&token=ABC123&time=611 |
Successful Response |
Example: Request: {"request":"end_lesson","token":"ABC123", "time":611} Response: {"status":true} If “status:true” is returned the class is set as “started” and connect the video stream between the student and teachers, once the video streams are connected and the class timer starts. |