获取和更新Bearer Token

此 API 允许客户端使用客户端凭据授予类型获取访问令牌。


要求您的PMS每隔90天通过此接口获取一次新的bearer token


POST /pcapigateway/account/token HTTP/1.1
Authorization: Basic ZGVtbzpkZW1vMTIz
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8

请求


字段

类型

是否必填

描述

Authorization

String

遵循 RFC7617 的基本身份验证。意味着使用“:”组合您的 client_id(account_id) 和 client_secret 并使用 Base64 加密整个字符串



响应

字段

类型

是否必填

描述

备注

accessToken

String

Access token issued by the authorization server. After a new access token is applied, all old access tokens will expire immediately

 

tokenType

String 

The type of the token. Typically "Bearer".

 



示例 1.1 - 更新token

响应

{
  "header": {
    "echoToken": "dda577cc-20e0-4427-bd41-609a6608dc54",
    "timeStamp": "2023-02-17T07:38:06.119Z",
    "version": "0.1"
  },
  "accessToken": "string",
  "tokenType": "Bearer"
}