Thay đổi thông tin người dùng

Mục lục

To modify the user’s nickname, you need SID, safekey, timestamp, mobile phone number (the mobile phone number when the user under the organization registered), user UID, nickname (the new nickname will be displayed below the user’s camera in the classroom), the maximum length of the nickname shall not exceed 24 characters, and the user’s Avatar. The description of the execution will be returned.

Note: This API only modifies the user nickname in the ClassIn app. It has nothing to do with data in ClassIn admin dashboard.

You can only modify the information of users under this organization.

Warning: In V3.4, this interface is defined as the status to be discarded (User nickname and avatar information belong to the user’s personal privacy information.

Institutions are no longer supported to modify those privacy information. In the institution own system, the institution should use the user’s name , not the user’s nickname.)

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 after applying for institution account in eeo.cn.

safeKey

Yes

Fixed 32-bit all lowercase characters

School authentication security key

safeKey=MD5(SECRET+timeSta mp)

timeStamp

Yes

Null

The current

Unix Epoch timestamp within 20

minutes of calling

interface time

The Unix Epoch timeStamp is the number of seconds elapsed since 00:00:00 (world standard time) on January 1, 1970.

Key

Required

More

Restrictions

Instructions

Description

uid

Yes

Null

User UID

User’s uid returned by registered user interface.

nickname

No

The maximum length is 24 characters. If it exceeds 24 words, it will be automatically intercepted into 24 words. Either pass nickname or filedata.

Choose one from two.

nickname

It will be displayed under the user camera in the classroom

Filedata

No

Binary stream.Either pass nickname               or filedata.

Choose  one from two.

The uploaded user’s Avatar will      be displayed on the ClassIn app. If the avatar is not uploaded, a

pop-up

window  for selecting               the avatar    will pop up when logging               in               to the app.

Picture typejpgjpeggifpng

Size300*300

Less than 1 M

Response data #

key

Type

Sample Value

Meaning

error_info

object

Return information object

└ errno

number

1

Error code

└ error

string

“The program executes normally”

Error details

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&uid=1001001&nickname=adair
  • 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 "uid=1001001" \
    -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":"The program executes normally"
    }
  }

Error Code Instruction #

Error

code

Instruction

1

Executed successfully

100

Incomplete or incorrect parameters

102

No permission (security verification failed)

103

File upload to server failed

104

Operation failed

114

Server exception

134

Illegal mobile phone number

192

This member does not exist under the organization and has no permission to modify (Please call the add student or add teacher interface)

224

Upload picture type error

341

Upload picture size error (300 * 300)

342

Upload picture size exceeds the limit

400

The requested data is illegal