Client ID 和 Client Secret,用于 OAuth 授权。请注意,Client Secret 需要妥善保存,不可分享给他人。/auth 接口以获取 Access Token。https://demo-api.easypayx.com/authgrant_type:表示使用的授权模式,此处的值固定为 client_credentials(必选)client_id:在您注册应用程序时得到的 Client ID(必选)client_secret:在您注册应用程序时得到的 Client Secret(必选)POST https://demo-api.easypayx.com/auth?grant_type=client_credentials&client_id=demo_client_id&client_secret=cwouf803ghv3op4ch32cu39djfhwpuowAccess Token(以及其他详细信息)的 JSON 响应,范例如下:HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"access_token": "xoxp-23984754863-2348975623103",
"expires_in": 86400,
"refresh_expires_in": 86400,
"refresh_token": "tGzv3JOkF0XG5Qx2TlKWIA",
"token_type": "bearer",
"not-before-policy": 0,
"session_state": "e696e720-8117-4691-9554",
"scope": "xyz"
}访问令牌默认 1800 秒过期,即 30 分钟,过期后重新获取访问令牌。