POST api/v1/Common/WxToken?appid={appid}
获取微信api Access_Token,统一管理以便不互相覆盖
请求信息(Request)
URI 参数
名称 | 描述 | 类型 | 备注 |
---|---|---|---|
appid | string |
Required |
Body 参数
WxAccess_Token名称 | 描述 | 类型 | 备注 |
---|---|---|---|
access_token | string |
None. |
|
expires_in | integer |
None. |
|
expires_time | date |
None. |
|
create_time | date |
None. |
|
errcode | integer |
None. |
|
errmsg | string |
None. |
请求格式
application/json, text/json
Sample:
{ "access_token": "sample string 1", "expires_in": 2, "expires_time": "2025-05-04T17:07:20.4181231+08:00", "create_time": "2025-05-04T17:07:20.4181231+08:00", "errcode": 5, "errmsg": "sample string 6" }
application/xml, text/xml
Sample:
<WxAccess_Token xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WLife.Application.WeiXin"> <errcode>5</errcode> <errmsg>sample string 6</errmsg> <access_token>sample string 1</access_token> <create_time>2025-05-04T17:07:20.4181231+08:00</create_time> <expires_in>2</expires_in> <expires_time>2025-05-04T17:07:20.4181231+08:00</expires_time> </WxAccess_Token>
application/x-www-form-urlencoded
Sample:
响应信息(Response)
资源描述
RequestResultOfWxAccess_Token名称 | 描述 | 类型 | 备注 |
---|---|---|---|
Data | WxAccess_Token |
None. |
|
Status |
状态(0:成功,1:失败) |
integer |
None. |
Message |
导致失败的相关消息 |
string |
None. |
Total |
集合总数,用于分页时使用 |
integer |
None. |
响应格式
application/json, text/json
Sample:
{ "Data": { "access_token": "sample string 1", "expires_in": 2, "expires_time": "2025-05-04T17:07:20.4181231+08:00", "create_time": "2025-05-04T17:07:20.4181231+08:00", "errcode": 5, "errmsg": "sample string 6" }, "Status": 1, "Message": "sample string 2", "Total": 3 }
application/xml, text/xml
Sample:
<RequestResultOfWxAccess_TokenFEB0ySd7 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WLife.Application"> <Message>sample string 2</Message> <Status>1</Status> <Total>3</Total> <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/WLife.Application.WeiXin"> <d2p1:errcode>5</d2p1:errcode> <d2p1:errmsg>sample string 6</d2p1:errmsg> <d2p1:access_token>sample string 1</d2p1:access_token> <d2p1:create_time>2025-05-04T17:07:20.4181231+08:00</d2p1:create_time> <d2p1:expires_in>2</d2p1:expires_in> <d2p1:expires_time>2025-05-04T17:07:20.4181231+08:00</d2p1:expires_time> </Data> </RequestResultOfWxAccess_TokenFEB0ySd7>