自建应用通过此接口获取 tenant_access_token。
tenant_access_token 的最大有效期是 2 小时。
tenant_access_token,这会同时存在两个有效的 tenant_access_token。tenant_access_token。| 基本 | |
|---|---|
| HTTP URL | https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal |
| HTTP Method | POST |
| 支持的应用类型 | Custom App |
| 权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用 |
无 |
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Content-Type | string | 是 | 固定值:"application/json; charset=utf-8" |
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| app_id | string | 是 | 应用唯一标识,创建应用后获得。有关app_id 的详细介绍。请参考通用参数介绍示例值: "cli_slkdjalasdkjasd" |
| app_secret | string | 是 | 应用秘钥,创建应用后获得。有关 app_secret 的详细介绍,请参考通用参数介绍示例值: "dskLLdkasdjlasdKK" |
{
"app_id": "cli_slkdjalasdkjasd",
"app_secret": "dskLLdkasdjlasdKK"
}
| 名称 | 类型 | 描述 |
|---|---|---|
| code | int | 错误码,非 0 取值表示失败 |
| msg | string | 错误描述 |
| tenant_access_token | string | 租户访问凭证 |
| expire | int | tenant_access_token 的过期时间,单位为秒 |
{
"code": 0,
"msg": "ok",
"tenant_access_token": "t-caecc734c2e3328a62489fe0648c4b98779515d3",
"expire": 7200
}
有关错误码的详细介绍,请参考通用错误码介绍。