POST api/CommonAccount/CommonWxLogin

通用微信登录接口

Request Information

URI Parameters

None.

Body Parameters

请求值

CommonWxLoginReq
NameDescriptionTypeAdditional information
unionId

用户id,微信使用unionid,QQ使用openid,facebook的uid

string

None.

openId

微信的OpenId

string

None.

productid

产品id

integer

None.

name

微信名称或是QQ名称或是facebook的昵称

string

None.

encodename

url加密后的微信名称

string

None.

accessToken

token值

string

None.

refreshToken

刷新token值,QQ没有就使用accessToken

string

None.

iconurl

用户头像

string

None.

expires_in

过期时间,Unix时间,豪秒

string

None.

city

城市

string

None.

province

省份

string

None.

country

国家

string

None.

language

语言

string

None.

gender

性别

string

None.

imei

用户imei,用于绑定以前的imei功能

string

None.

mduniqueid

用户的手机唯一值

string

None.

Request Formats

application/json, text/json

Sample:
{
  "unionId": "sample string 1",
  "openId": "sample string 2",
  "productid": 3,
  "name": "sample string 4",
  "encodename": "sample string 5",
  "accessToken": "sample string 6",
  "refreshToken": "sample string 7",
  "iconurl": "sample string 8",
  "expires_in": "sample string 9",
  "city": "sample string 10",
  "province": "sample string 11",
  "country": "sample string 12",
  "language": "sample string 13",
  "gender": "sample string 14",
  "imei": "sample string 15",
  "mduniqueid": "sample string 16"
}

application/xml, text/xml

Sample:
<CommonWxLoginReq xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAppCommonV2.Models">
  <accessToken>sample string 6</accessToken>
  <city>sample string 10</city>
  <country>sample string 12</country>
  <encodename>sample string 5</encodename>
  <expires_in>sample string 9</expires_in>
  <gender>sample string 14</gender>
  <iconurl>sample string 8</iconurl>
  <imei>sample string 15</imei>
  <language>sample string 13</language>
  <mduniqueid>sample string 16</mduniqueid>
  <name>sample string 4</name>
  <openId>sample string 2</openId>
  <productid>3</productid>
  <province>sample string 11</province>
  <refreshToken>sample string 7</refreshToken>
  <unionId>sample string 1</unionId>
</CommonWxLoginReq>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

CommonWxLoginRect
NameDescriptionTypeAdditional information
state

返回状态,0是表示登录成功,1是表示失败,20表示绑定设备已超了

integer

None.

md5

accessToken的md5值

string

None.

uid

用户唯一值

string

None.

iconfile

头像url地址

string

None.

moblie

手机号码

string

None.

province

省份

string

None.

city

城市

string

None.

nickname

名称

string

None.

isflag

是否已绑定微信,1表示已绑定,0表示未绑定

integer

None.

ShareCode

用户分享码

string

None.

IsSetParentCode

上级分享码是否填写,1为已填写,0为未填写

integer

None.

sex

性别

integer

None.

birthday

生日

string

None.

signature

个性签名

string

None.

IsValidateUser

是否实名

integer

None.

Token

用户令牌,后续验权用

string

None.

ChangedMachineCount

不同设备登录次数

integer

None.

MachineCanLoginCount

总共可以切换几次机器

integer

None.

IsChangeMachine

针对上次是否已切换机器

boolean

None.

UserDesc

string

None.

IsSetPassword

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "state": 1,
  "md5": "sample string 2",
  "uid": "sample string 3",
  "iconfile": "sample string 4",
  "moblie": "sample string 5",
  "province": "sample string 6",
  "city": "sample string 7",
  "nickname": "sample string 8",
  "isflag": 9,
  "ShareCode": "sample string 10",
  "IsSetParentCode": 11,
  "sex": 12,
  "birthday": "sample string 13",
  "signature": "sample string 14",
  "IsValidateUser": 15,
  "Token": "sample string 16",
  "ChangedMachineCount": 17,
  "MachineCanLoginCount": 18,
  "IsChangeMachine": true,
  "UserDesc": "sample string 20",
  "IsSetPassword": 21
}

application/xml, text/xml

Sample:
<CommonWxLoginRect xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAppCommonV2.Models">
  <ChangedMachineCount>17</ChangedMachineCount>
  <IsChangeMachine>true</IsChangeMachine>
  <IsSetParentCode>11</IsSetParentCode>
  <IsSetPassword>21</IsSetPassword>
  <IsValidateUser>15</IsValidateUser>
  <MachineCanLoginCount>18</MachineCanLoginCount>
  <ShareCode>sample string 10</ShareCode>
  <Token>sample string 16</Token>
  <UserDesc>sample string 20</UserDesc>
  <birthday>sample string 13</birthday>
  <city>sample string 7</city>
  <iconfile>sample string 4</iconfile>
  <isflag>9</isflag>
  <md5>sample string 2</md5>
  <moblie>sample string 5</moblie>
  <nickname>sample string 8</nickname>
  <province>sample string 6</province>
  <sex>12</sex>
  <signature>sample string 14</signature>
  <state>1</state>
  <uid>sample string 3</uid>
</CommonWxLoginRect>