获取访问令牌

URL地址:api/Auth?username={username}&password={password}&signature={signature}&timestamp={timestamp}&nonce={nonce}&appid={appid}&code={code}&wxName={wxName}&sex={sex}&address={address}

请求方式:GET

传递参数

名   称描   述参数类型附加信息
username

用户登录名称

string

Required

password

用户密码

string

Required

signature

加密签名字符串

string

Required

timestamp

时间戳

string

Required

nonce

随机字符串

string

Required

appid

应用接入ID

string

Required

code

授权code

string

None.

wxName

用户昵称

string

None.

sex

用户性别

integer

Default value is 1

address

地址

string

None.

传递对象

None.

返回对象

TokenResult ()
名   称描   述参数类型附加信息
Errcode

错误代码

integer

None.

Errmsg

错误信息

string

None.

AccessToken

访问令牌

string

None.

Expires

过期时间(秒)

integer

None.

OpenID

OpenID

string

None.

session_key

session_key

string

None.

uid

用户id

string

None.

wxName

用户昵称

string

None.

basicsPrice

基础价格

string

None.

addPrice

增项价格

string

None.

返回对象格式

application/json, text/json

Sample:
{
  "Errcode": 1,
  "Errmsg": "sample string 2",
  "AccessToken": "sample string 3",
  "Expires": 4,
  "OpenID": "sample string 5",
  "session_key": "sample string 6",
  "uid": "sample string 7",
  "wxName": "sample string 8",
  "basicsPrice": "sample string 9",
  "addPrice": "sample string 10"
}

application/xml, text/xml

Sample:
<TokenResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WeChat.Api.Models">
  <AccessToken>sample string 3</AccessToken>
  <Errcode>1</Errcode>
  <Errmsg>sample string 2</Errmsg>
  <Expires>4</Expires>
  <OpenID>sample string 5</OpenID>
  <addPrice>sample string 10</addPrice>
  <basicsPrice>sample string 9</basicsPrice>
  <session_key>sample string 6</session_key>
  <uid>sample string 7</uid>
  <wxName>sample string 8</wxName>
</TokenResult>