GET api/Token?APIKey={APIKey}&Timestamp={Timestamp}&APISign={APISign}
申请Token票据(Token时效:7200秒,建议根据ExpiresTime时间设置缓存)
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
APIKey |
APIKey标识 |
string |
Required |
Timestamp |
时间戳,标准北京时间,时区为东八区,自1970年1月1日 0点0分0秒以来的秒数。注意:部分系统取到的值为毫秒级,需要转换成秒(10位数字),如:1412248956 |
string |
Required |
APISign |
签名,参数:APIKey、APISecret、Timestamp,将这3个参数按照参数名ASCII码从小到大排序(字典序),使用URL键值对的格式(即key1=value1&key2=value2…)拼接成字符串string,再进行MD5加密即得到APISign |
string |
Required |
Body Parameters
None.
Response Information
Resource Description
ResultOfResultTokenName | Description | Type | Additional information |
---|---|---|---|
Status | ResultStatusCode |
None. |
|
Msg | string |
None. |
|
Data | ResultToken |
None. |
Response Formats
application/json, text/json
Sample:
{ "Status": 200, "Msg": "sample string 1", "Data": { "Token": "sample string 1", "ExpiresTime": 2 } }
application/xml, text/xml
Sample:
<ResultOfResultTokenlT2OjdAF xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OpenWebApi.Models"> <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/OpenWebApi.Models.Response"> <d2p1:ExpiresTime>2</d2p1:ExpiresTime> <d2p1:Token>sample string 1</d2p1:Token> </Data> <Msg>sample string 1</Msg> <Status>Success</Status> </ResultOfResultTokenlT2OjdAF>