Add Student

The addSchoolStudent interface is to bind a registered account to your institution in the student identity.

Notes:

The API call requires SID, safeKey, timeStamp, student account and student name.

In API integration, addSchoolStudent is an interface that you must call. To make an API call successfully, please note that:

  • The addSchoolStudent interface is equivalent to the student management function in the ClassIn management console. Path: ClassIn management console-Home-Teaching-Students-Add Student. A registered user must be added to your institution first, then can be arranged with lessons. If the user is not a student belonging to your institution, an error code will be returned when you call API to arrange lessons for the user.
  • New users that have not registered in the ClassIn system before can be directly added to your institution when you call the register interface. Please refer to the register interface for detailed information. For registered users, the register API implementation returns error code 135. Please then call the addSchoolStudent interface to bind the account to your institution.

URL

https://api.eeo.cn/partner/api/course.api.php?action=addSchoolStudent

HTTP Request Methods

  • POST

Coding Format

  • UTF-8

Request Data

Key Required More Restrictions Instructions Description
SID Yes Null School ID It is available through the eeo.cn application
safeKey Yes Fixed 32-bit all lowercase characters School authentication security key safeKey=MD5(SECRET+timeStamp)
timeStamp Yes Null imestamp used by safeKey Unix Epoch timeStamp is the number of seconds passed by 00:00 (world standard time) on January 1, 1970
studentAccount Yes Mobile phone number or email. Format: 00 country number - mobile phone number; note: mobile phone Numbers in mainland China do not include country .Either studentUid or studentUid. If studentAccount is passed to studentUid at the same time, the studentUid parameter shall prevail Student account For example: fill US mobile phone number 1 (800) 643-7676 as 001-8006437676;The phone number of mainland China is 15800000001
studentName Yes 1-24 words, no distinction between Chinese and English, more than 24 will automatically cut into 24 words Student names will be displayed in the student administration office in the background of eeo.cn Null

Response Data

Key Type Sample Value Meaning
error_info object Return information object
└ errno number 1 The error code
└ error string "Routine execution" Error details

Sample

  • HTTP Request
POST /partner/api/course.api.php?action=addSchoolStudent HTTP/1.1
Host: root_url
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

SID=2339736&safeKey=dcbc0d041c043f3a4decabe6d24e61dd&timeStamp=1493712683&studentAccount=001-8006437676&studentName=Jeck
  • Shell cURL analog request instruction
curl -H "Content-Type: application/x-www-form-urlencoded" -X "POST" \
      -d "SID=1234567" \
      -d "safeKey=0f7781b3033527a8cc2b1abbf45a5fd2" \
      -d "timeStamp=1484719085" \
      -d "studentAccount=001-8006437676" \
      -d "studentName=Jeck" \
      "https://api.eeo.cn/partner/api/course.api.php?action=addSchoolStudent"

Response sample(The normal return json packet example)

{
  "error_info": {
    "errno": 1,
    "error": "程序正常执行"
  }
}

Error Code Description

Error Code Description
1 Successful execution.
100 Incomplete or incorrect parameters.
102 No permissions(Security verification failed).
104 Operation failed (unknown error).
113 The mobile phone number is not registered.
114 Server exception.
128 The institution account cannot be added as a student.
133 The account has already been added as a student in the institution.
134 The mobile phone number is illegal.
288 The mobile phone number segment is invalid.
886 The student account has been deleted by the user.

results matching ""

    No results matching ""