获取应用安全令牌接口
接口说明
使用平台入驻后下发的appId、appSecret,换取业务应用平台使用的应用安全令牌
接口描述
本接口用于获取应用安全令牌,该安全令牌是客户端或第三方服务在调用其他需要授权验证的接口时所使用的凭证。通过此接口,您可以获取到有效期内的应用安全令牌,以便进行后续的API调用。
请求地址
POST /paas/api/application/authorization
请求参数
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| appId | body | string | 是 | 应用ID | none |
| appSecret | body | string | 是 | 应用秘钥 | none |
请求示例
shell
curl --location --request POST 'https://test-spt.oaexpert.com/paas/api/application/authorization' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Host: test-spt.oaexpert.com' \
--header 'Connection: keep-alive' \
--data-raw '{
"appId":"1889870464363339000",
"appSecret":"hmKCDWlftlvBdXG000"
}'响应结果
| 参数名称 | 参数类型 | 描述 |
|---|---|---|
| status | integer | 状态码 |
| msg | string | 消息 |
| data | string | 应用安全令牌 |
| traceId | string | 追踪码 |
| success | boolean | 请求是否成功 |
响应示例
json
{
"status": 0,
"msg": "成功",
"data": "1823919079496925000",
"traceId": "1824078567264788480",
"success": true
}