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-urlencodedobjectレスポンススキーマ#
{ "access_token": "YOUR_ACCESS_TOKEN", "token_type": "Bearer", "expires_in": 300, "refresh_token": "YOUR_REFRESH_TOKEN", "scope": "catalog:read operations:read"}エラーと制限#
{ "error": "invalid_request"}