跳转到文档
打开控制台
本页内容

POST /oauth/token

OAuth 使用 S256 PKCE、精确匹配的重定向 URI,以及独立的 REST 或 MCP 资源。授权同意在 Tong 中完成。刷新令牌每次使用后都会轮换。

请求示例#

curl -X POST 'https://platform.tongai.io/oauth/token' \  -H "Content-Type: application/x-www-form-urlencoded" \  --data-urlencode 'grant_type=refresh_token' \  --data-urlencode 'refresh_token=YOUR_REFRESH_TOKEN' \  --data-urlencode 'client_id=https://your-app.example/oauth-client.json' \  --data-urlencode 'resource=https://platform.tongai.io/mcp'
配置
curl --version

身份验证#

none

参数#

无需参数。

请求正文#

application/x-www-form-urlencoded
object

响应架构#

JSON
{  "access_token": "YOUR_ACCESS_TOKEN",  "token_type": "Bearer",  "expires_in": 300,  "refresh_token": "YOUR_REFRESH_TOKEN",  "scope": "catalog:read operations:read"}

错误与限制#

JSON
{  "error": "invalid_request"}