申請(qǐng)動态令牌
## 接口名稱
申請(qǐng)動态令牌
## 接口描述
在調用标識關聯接口前,需要向标識系統申請(qǐng)訪問權限動态令牌。
## 接口地址
https://api.gdsinsing.com/safety/safe/token
## 調用方式
|方法|數(shù)據類型|
|-|-|
|[ ] GET|[ ] form-data|
|[X] POST|[X] x-www-form-urlencoded|
|[ ] PUT|[ ] raw|
|[ ] DELETE||
## 參數(shù)說明(míng)
|參數(shù)名|類型|必填|說明(míng)|
|-|-|-|-|
|account|String|是|标識前綴|
|timestamp|String|是|時(shí)間(jiān)戳,當前系統時(shí)間(jiān)的long值|
|sign|String|是|使用用戶密鑰對account+timestamp的數(shù)字簽名值(SM9)。|
## 返回結果
詳見:[API接口返回結果說明(míng)](doc:uPPE78uC)
#### 成功返回
|參數(shù)名|類型|說明(míng)|
|-|-|-|
|result|Int|調用結果(0:失敗,1:成功)|
|data|String|動态令牌token|
#### 失敗返回
詳見:[API接口失敗返回](doc:AYrPnJLE)
## 調用例子
``` JavaScript
var timestamp = "...."; //時(shí)間(jiān)戳
var sign = "...."; //(88.168.89+timestamp)的SM9簽名值
var settings = {
"url": "https://api.gdsinsing.com/safety/safe/token",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/x-www-form-urlencoded"
},
"data": {
"account": "88.168.89",
"timestamp": timestamp,
"sign": sign
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
```