About API v2
With the upgrade of ClassIn product features, the ClassIn API has launched version v2.
Here are the main differences compared to the previous ClassIn API (v1):
Interface URL Change: The URL no longer includes parameters (action=). Instead, different paths determine which interface is used.
Data Format: JSON is now the standard format for data exchange, replacing form data. Requests must include
Content-Type: application/json
.Security Verification: The new signature parameter,
X-EEO-SIGN
, replaces the originalsafeKey
. This parameter is included in the header instead of the body. For signature rules, please click here.Timestamp Requirement: In v2, the timestamp is still required, but the expiration time has reduced from 20 minutes in v1 to 5 minutes in v2.
Response Data Format: The response format is now JSON, but it differs slightly from the previous version. The error code is now at the top-level (
code
), instead of being nested undererror_info
->errno
.
What is the Relationship Between API v1 and API v2?
Starting in August 2024, all new interfaces will use the API v2 format, while existing interfaces will continue to operate under API v1.
In the future, we will gradually update the v1 interfaces to the v2 format.
Which Interfaces Use API v2?
Currently, all interfaces in the LMS directory are using API v2. However, other interfaces, such as user registration and class(course) creation, still use the original API v1.
For specific details, please check the documentation for each interface.
During this transition period, complete system integration will usually involve calls to both versions of the API.
Recommended API Call Sequence for Creating an Interactive Online Classroom
To create an online classroom, it is recommended to follow this sequence of API calls:
- Register User (v1 API)
- Create Class (Course) (v1 API)
- Create Unit (v2 API)
- Create Classroom Activity (v2 API)
- Receive Summary Data after Classroom Activity (webhook)
If you want to add or remove a students from a classroom activity, you can use:
- Add Activity Member (v2 API)
- Remove Activity Members (v2 API)
Note: The interfaces mentioned above include both old and new versions. This document explains the differences in how to call each version.
Differences Between Creating Classroom Activities (New Interface) and Creating Lesson (Old Interface)
A classroom is a type of LMS activity linked to a class(course) and is an upgraded version of the existing lessons. Currently, some featuers available in lessons are not included in classroom activities.
In future updates, lessons will gradually be phased out and completedly replaced by classroom activities.
To reduce repetitive work during system integration, it is recommended that recently integrated systems the use new interfaces to create classrooms activities instead of lesson(v1 API).