Get the login client url
Get the login client link,Need SID, safekey, timeStamp, provide mobile phone number, valid time section, the course ID, Class ID,ClassIn client login platform identity, return Can in Pc terminal or mobile terminal arouse ClassIn client
links. prompt:currently only supports the PC and mobile terminal ios ,android under development.
URL
https://api.eeo.cn/partner/api/course.api.php?action=getLoginLinked
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 is:00 Country code-Mobile number;Chinese Mainland mobile Numbers can be omitted from country code | mobile Numbers | Example:American mobile number 1 (800) 643-7676 send 001-8006437676;Chinese Mainland mobile Numbers +86-13701237634 send 13701237634 |
lifeTime | No | The default is 86400 seconds | safeKey the effective time(Unit: second) | Null |
courseId | Yes | Null | course ID | The return value after the course is created |
classId | Yes | Null | class ID | The return value after the class is created |
deviceType | No | default is 1,behalf PC | Platform logo | 1 behalf Windows/Mac OS ;2 behalf iOS mobile terminal;3 behalf Android |
uid | No | Choose one from telephone,If uid and telephone are passed in at the same time,The uid parameter shall prevail | User's UID | Register the user UID returned by the user |
Response data
key | Type | Sample value | meaning |
---|---|---|---|
data | string | classin://www.eeo.cn/enterclass? telephone=23692341020& authTicket=04sxvif1bczi6lzs& classId=1424463&courseId=444451& schoolId=1009478 |
In the website login ClassIn client links |
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=getLoginLinked 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=23692341020&lifeTime=&courseId=332241&classId=1227045&deviceType=1
- 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=23692341040" \
-d "lifeTime=" \
-d "courseId=332241" \
-d "classId=1227045" \
"https://api.eeo.cn/partner/api/course.api.php?action=getLoginLinked"
Pc terminal response sample(The normal return json
packet example)
{
"data": "classin://www.eeo.cn/enterclass?telephone=23692341020&authTicket=04sxvif1bczi6lzs&classId=1424463&courseId=444451&schoolId=100947",
"error_info": {
"errno": 1,
"error": "程序正常执行"
}
}
The client page wakes up the middle prompt page(optional)
Main use:
Use the client page to wake up functionality,There will be a page that prompts the user if it is not started,Or start failure,Please download the installation 'ClassIn' client at 'eeo.cn'.
Results the preview:
Wake up 12345678901 ClassIn client account
Instructions for use:
Replace the loginlink in the <a> tag href attribute with the client page of the required account to wake the link.The second line of the following code is shown.
<a href='https://api.eeo.cn/partner/invoke/classin.html?loginlink'>go into the classroom</a>
<a href="https://api.eeo.cn/partner/invoke/classin.html?classin://www.eeo.cn/enterclass?telephone=12345678901&authTicket=g7cx9tj3fs51n7dm&classId=1213545&courseId=394761&schoolId=1009478">Wake up 12345678901 ClassIn client account</a>
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 exception. |
134 | Expression incorrect phone number format. |
142 | Expression this course does not have this class information. |
143 | Expression no such course information. |
144 | Expression there is no such course under the agency. |
145 | Expression the class is over. |
150 | Expression no access to the phone number login key(This cell phone number does not belong to the student or teacher at the school). |
212 | Expression this class has been removed. |
369 | Expression open class does not support this operation. |