---
id: "zh/api-post-api-refreshtoken-do"
title: "刷新 token"
language: "zh"
description: "POST /api/refreshToken.do：刷新 token 接口说明，包含路径、方法、参数和返回信息。"
canonical_url: "https://www.babel.cc/public/babelwiki/zh/api-post-api-refreshtoken-do.html"
markdown_url: "https://www.babel.cc/public/babelwiki/ai/zh/api-post-api-refreshtoken-do.md"
alternates: {"en": "https://www.babel.cc/public/babelwiki/ai/en/api-post-api-refreshtoken-do.md", "zh": "https://www.babel.cc/public/babelwiki/ai/zh/api-post-api-refreshtoken-do.md"}
reading_note: "文档记录不等于当前部署能力；以实际版本、授权模块与配置为准。保留原文的可选、限制及待确认说明，勿补猜接口。 / Documentation is not a guarantee for every deployment. Preserve optional-module requirements, limitations and unresolved API contracts."
---

# 刷新 token

| 属性 | 值 |
| --- | --- |
| HTTP 方法 | `POST` |
| 接口路径 | `/api/refreshToken.do` |

## 认证请求头

使用 `Authorization: Basic <BASE64_CLIENT_CREDENTIALS>`，其中凭证为 `Base64Encode(client_id + ":" + client_secret)`。本端点不使用 Bearer 认证。Base64 不是加密，必须通过 HTTPS 传输，密钥仅保存在可信服务端。

## URL 参数

源 API 文档将以下字段定义为 URL 参数：

| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `grant_type` | string | 必填，固定为 `refresh_token` |
| `refresh_token` | string | 必填，此前获取的刷新凭证 |



## 返回字段

| 字段 | 说明 |
| --- | --- |
| `access_token` | 调用业务接口的访问凭证 |
| `refresh_token` | 刷新访问凭证；源文档标注有效期 30 天 |
| `expires_in` | access_token 的有效秒数；按实际响应安排刷新，不能仅依赖固定值 |

安全保存响应中的最新凭证。避免并发刷新相互覆盖；发生认证失效时重新完成授权。不要在日志、监控 URL 或错误截图中暴露授权码和 Token。业务接口的请求头格式见[API 概览](https://www.babel.cc/public/babelwiki/zh/developer-api-overview.html)，不要把本接口的 Basic 认证直接用于所有业务接口。
