Modify User Information
Modify the user's nickname,need SID, safekey, timeStamp,user UID,Mobile phone number is the mobile phone number when the user registers under the shool,the nickname will be displayed below the instructing indoor user camera,Maximum no more than 24 characters。Returns the description after execution。Note: this interface only modifies the user information in ClassIn and the eeo.cn background data.
Notes:
- Can only modify the nickname of the user under this organization.
Warning:In V3.4 it is marked as depreated(The interface will no longer be supported after 1st April 2020)
URL
https://api.eeo.cn/partner/api/course.api.php?action=editUserInfo
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 | No | Format: 00 country number - mobile phone number; note: mobile phone Numbers in mainland China do not include country .Choose one from uid. If telephone and uid are transmitted at the same time, the uid parameter shall prevail | Register mobile phone number | |
nickname | Yes | Maximum 24 characters | Nickname | Show below the classroom user's camera |
uid | No | Choose one from telephone. If uid and telephone are transmitted at the same time, the uid parameter shall prevail | User's UID | Register the user UID returned by the user interface |
Filedata | No | Binary stream,At least one with nickname | The uploaded user avatar will be displayed on the ClassIn client;不Do not upload avatars, login client will pop up the selection of avatars pop-up window | Image type: JPG, jpeg, GIF, PNG size: 300*300 size: less than 1 M |
Response data
key | Type | Sample value | meaning |
---|---|---|---|
error_info | object | Return message object | |
└ errno | number | 1 | The error code |
└ error | string | "Normal execution" | Error list |
Sample
- HTTP request
POST /partner/api/course.api.php?action=editUserInfo HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
SID=2339736&safeKey=8d3fb00ceddd29638e2d5dd12d69841d&timeStamp=1492793638&telephone=18516988551&nickname=adair&uid=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=12345678901" \
-d "nickname=123456" \
"https://api.eeo.cn/partner/api/course.api.php?action=editUserInfo"
Response sample(The normal return json
packet example)
{
"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). |
104 | expression operation failure(An unknown error). |
114 | expression Server connection exception. |
134 | expression Incorrect phone number format. |
192 | expression There is no member of this mobile. phone number in the school, no change authority(This member must have been added to the course or class to have permission to modify the nickname). |
224 | Indicates wrong type of uploaded image |
341 | Indicates wrong size of uploaded picture (300*300) |
342 | Indicates that the size of the uploaded image exceeds the limit |
400 | Indicates that the request data is not valid. |