curl --request GET \
--url https://sandbox-openplatform.keysecure.io/open-api/v1/merchant/token \
--header 'Content-Type: application/json' \
--header 'Api-Key: your_api_key' \
--header 'Timestamp: 1716307200000'
{
"code": 0,
"msg": "Success",
"data": {
"access_token": "",
"expired_time": 1
}
}
认证相关
获取 Token接口
GET
/
open-api
/
v1
/
merchant
/
token
curl --request GET \
--url https://sandbox-openplatform.keysecure.io/open-api/v1/merchant/token \
--header 'Content-Type: application/json' \
--header 'Api-Key: your_api_key' \
--header 'Timestamp: 1716307200000'
{
"code": 0,
"msg": "Success",
"data": {
"access_token": "",
"expired_time": 1
}
}
获取商户 API 访问凭证,用于后续接口鉴权。本接口仅需
Api-Key 与 Timestamp,无需 Access-Token。
请求头
string
必填
apiKey(商户凭证,与 IP 白名单绑定)
string
必填
Unix 时间戳(毫秒),与服务端偏差须在 60 秒内,且不接受未来时间戳
string
默认值:"application/json"
固定为
application/json返回参数
number
响应状态码,
0 表示成功string
响应消息
curl --request GET \
--url https://sandbox-openplatform.keysecure.io/open-api/v1/merchant/token \
--header 'Content-Type: application/json' \
--header 'Api-Key: your_api_key' \
--header 'Timestamp: 1716307200000'
{
"code": 0,
"msg": "Success",
"data": {
"access_token": "",
"expired_time": 1
}
}
