POST api/ExcellentSchool/Login

Login by user name and password

Request Information

Body Parameters

LoginModel
NameDescriptionTypeAdditional information
Name

用户名 [或IMEI]

string

None.

Pass

密码

string

None.

AppId

APP应用标识

string

None.

PushId

推送Id

string

None.

Language

用户语方言

string

None.

LoginType

登录类型 0. 表示用户登录

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "Pass": "sample string 2",
  "AppId": "sample string 3",
  "PushId": "sample string 4",
  "Language": "sample string 5",
  "LoginType": 6
}

application/xml, text/xml

Sample:
<LoginModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 3</AppId>
  <Language>sample string 5</Language>
  <LoginType>6</LoginType>
  <Name>sample string 1</Name>
  <Pass>sample string 2</Pass>
  <PushId>sample string 4</PushId>
</LoginModel>

Response Information

Resource Description

State 对应状态
0. 表示请求正常,正确返回
1000. 表示账户不存在
1007. 表示邮箱未激活[用户登录有效,全局可配置]

LoginResult
NameDescriptionTypeAdditional information
LoginType

登录类型 0. 表示用户登录 1. 表示设备登录

integer

None.

AccessToken

本次访问Token

string

None.

Item

相应实体,用户登录时返回用户信息,设备登录时返回设备信息

Object

None.

ThirdParty

第三方登录信息[一般仅用户登录有效]

Object

None.

State

状态码

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "LoginType": 1,
  "AccessToken": "sample string 2",
  "Item": {},
  "ThirdParty": {},
  "State": 5
}

application/xml, text/xml

Sample:
<LoginResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <State>5</State>
  <AccessToken>sample string 2</AccessToken>
  <Item />
  <LoginType>1</LoginType>
  <ThirdParty />
</LoginResult>