Add the teacher

Add the teacher,Need SID, safekey, timeStamp, teacher's phone number, name and photo, in which photos are sent in binary stream type. Returns the ID of the relationship between the school and the teacher (It is needed in the edit teacher information interface);

URL

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

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
teacherAccount Yes Format: 00 country number - mobile phone number; note: mobile phone Numbers in mainland China do not include country .TeacherUid or teacherUid. If teacherAccount and teacherUid are passed at the same time, the teacherUid parameter shall prevail The teacher's cell phone number For example: us mobile phone number 1 (800) 643-7676 filled 001-8006437676;The phone number of mainland China is 15800000001
teacherName Yes Null Teacher's name Null
Filedata No Binary stream Teacher's picture Null

Response data

key Type Sample value meaning
data number 14163 The ID of the relationship between the school and the teacher (It is needed in the edit teacher information interface)
error_info object Return message object
└ errno number 1 Error code
└ error string "Normal execution" Error details

Sample

  • HTTP request
POST /partner/api/course.api.php?action=addTeacher HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

SID=2339736&safeKey=8d3fb00ceddd29638e2d5dd12d69841d&timeStamp=1492793638&teacherAccount=23692341040&teacherName=hubert&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 "teacherAccount=23692341040" \
       -d "teacherName=hubert" \
       -d "Filedata=@~/photo.jpg" \
       "https://api.eeo.cn/partner/api/course.api.php?action=addTeacher"

Response sample(The normal return json packet example)

{
  "data": 14161,
  "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).
103 expression failed to put the image in the server
104 expression operation failure(An unknown error)
113 expression the mobile phone account is not registered
114 expression server exception
122 expression teacher's account is not legal
131 expression registration failed
133 expression The account has been under the agency
288 Indicates that this paragraph is illegal
400 Indicates that the request data is not valid

results matching ""

    No results matching ""