Registered users
Registered users,Need SID, safekey, timeStamp, with effective registered mobile phone number as login ClassIn
client account, nicknamed and head portrait can fill in the item, the password may be clear or MD5 encryption(MD5 encryption is recommended),after the registration is successful, the student's UID will be returned.The UID is the same UID as the studentUid returned in the student list interface.After the head portrait setting is successful, no resetting is required for the ClassIn client.
URL
https://api.eeo.cn/partner/api/course.api.php?action=register
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 |
telephone | Yes | Format is:00 Country code-Mobile number;Mainland China mobile phone number does not write country number, the first number of phone number can't is 0 | mobile Numbers | Example:American mobile number 1 (800) 643-7676 send 001-8006437676;Chinese Mainland mobile Numbers send 13701237634 |
nickname | No | The default registration phone number | Nickname | Show below the classroom user's camera,Maximum 24 characters |
password | Yes(And md5pass 2 choose 1) | Null | Text passwords | No less than 6 |
md5pass | Yes(And password 2 choose 1) | Null | MD5 encryption password | 32-bit MD5 encryption |
Filedata | No | Binary stream | Upload user head portrait will be show below the ClassIn client |
picture type:jpg,jpeg,gif,png size:300*300 Less than 1 M |
addToSchoolMember | No | 0 no action;1 add as school student;2 add as school teacher ;other no action. default=0 | Whether add as school member |
Response data
key | Type | Sample value | meaning |
---|---|---|---|
data | number | Registers the returned user ID(this UID used in institutional subscription messages) | |
error_info | object | Return message object | |
└ errno | number | 1 | The error code |
└ error | string | "Normal execution" | Error details |
Sample
- HTTP request
POST /partner/api/course.api.php?action=register HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
SID=2339736&safeKey=3276433ab0216d9aec2621431cc12248&timeStamp=1494407873&telephone=18516900101&password=123456&Filedata=@~/photo.jpg
- 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 "telephone=12345678900" \
-d "password=123456" \
-d "Filedata=@D:\touxiang.jpg"\
"https://api.eeo.cn/partner/api/course.api.php?action=register"
Response sample(The normal return json
packet example)
{
"data": 1001930,
"error_info": {
"errno": "1",
"error": "程序正常执行"
}
}
Error code instruction
Error code | Instruction |
---|---|
1 | Expression successful execution. |
100 | Expression parameter not all or error. |
102 | Expression dont have permissions(Security verification failed). |
114 | Expression server exception. |
131 | Expression registration failed. |
134 | Expression cell phone number is illegal. |
135 | Expression the phone number has been registered. |
137 | Expression the password is not 6 bits long. |
224 | Expression upload picture type error. |
288 | Expression this number is not legal. |
340 | Expression registered success,user profile setting failed. |
341 | Expression upload picture size error(300*300). |
342 | Expression upload pictures too big(1M). |