GET /oauth/authorize
OAuth 使用 S256 PKCE、精确匹配的重定向 URI,以及独立的 REST 或 MCP 资源。授权同意在 Tong 中完成。刷新令牌每次使用后都会轮换。
请求示例#
curl 'https://platform.tongai.io/oauth/authorize?client_id=https%3A%2F%2Fyour-app.example%2Foauth%2Fclient.json&redirect_uri=https%3A%2F%2Fyour-app.example%2Foauth%2Fcallback&resource=https%3A%2F%2Fplatform.tongai.io%2Fmcp&scope=catalog%3Aread+operations%3Aread&code_challenge=BASE64URL_SHA256_OF_VERIFIER&code_challenge_method=S256&response_type=code&state=RANDOM_SESSION_STATE'配置
curl --version身份验证#
none参数#
client_idstring必填redirect_uristring必填resourcestring必填scopestring必填code_challengestring必填code_challenge_methodstring必填response_typestring必填statestring可选请求正文#
此端点没有请求正文。
响应架构#
在用户浏览器中打开授权 URL。Tong 显示授权确认,然后将授权码发送至已注册的重定向 URI。
HTTP/1.1 302 FoundLocation: https://tongai.io/developers/authorize?id=e8aa0a87-6cd9-42eb-975a-b72bf43218c8响应没有正文。
错误与限制#
{ "error": "invalid_request"}