# accessToken 获取接口文档 V1.0

# 接口地址

测试环境:https://open-tenant-api-test.xhsnw.com (opens new window)

# POST accessToken 获取接口

# 测试环境域名:

POST /action/tenant/token/credential

Body 请求参数

{
  "authType": "1",  #固定传值"1"字符串。
  "secretKey": "string",  #应用的 secretKey
  "secretId": "string", #应用的 secretId
  "clientCode": "string" #应用唯一标识
}

# 请求参数

名称 位置 类型 必选 说明
authType body string 是 V1.0 版本固定值 1
secretId body string 是 应用的 secretId
secretKey body string 是 应用的 secretKey
clientCode body string 是 应用唯一标识

img (opens new window)

返回示例

200 Response

{
  "code": 200,
  "message": "Ok",
  "data": {
    "createTime": "2024-10-11 11:39:41",
    "updateTime": "2024-10-11 11:39:41",
    "deleted": false,
    "credentialId": 25,
    "clientCode": "KCGiiGokLp",
    "platformCode": null,
    "siteId": null,
    "accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI4U2txVlIzdDFXOEF1VVlSIiwib2lkIjoxLCJleHAiOjE3Mjg2Mzk1ODF9.Q6jaa5mDobD5bFhhyRM-ejF54zx2Qp_RtR17dY1rOxU",
    "refreshToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI4U2txVlIzdDFXOEF1VVlSIiwib2lkIjoxLCJleHAiOjE3MzY1MDE5ODF9.gNWUeQv0MBMTJEKvN5bOadUALFKK2T6dVvGyJd6YAxM",
    "accessTokenExpiration": "2024-10-11 17:39:41",
    "refreshTokenExpiration": "2024-10-26 16:39:41",
    "authInfoId": null,
    "authStatus": null,
    "authType": 1,
    "comment": null
  }
}
名称 类型 说明
code int 返回码
message string 返回信息
data object 返回数据
» createTime string 创建时间
» updateTime string 更新时间
» deleted bool 是否删除
» credentialId int ID
» clientCode string 应用唯一标识
» platformCode string 平台编码
» siteId int 站点 ID
» accessToken string accessToken
» refreshToken string 刷新令牌
» accessTokenExpiration string accessToken 过期时间
» refreshTokenExpiration string 刷新令牌过期时间
» authInfoId int 授权信息 ID
» authStatus int 授权状态
» authType int 授权类型
» comment string 备注