Skip to documentation
Open dashboard
On this page

POST /oauth/token

OAuth uses S256 PKCE, an exact redirect URI and a separate resource for REST or MCP. Consent is completed in Tong. Refresh tokens rotate on every use.

Request example#

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'
Configuration
curl --version

Authentication#

none

Parameters#

No parameters are required.

Request body#

application/x-www-form-urlencoded
object

Response schema#

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

Errors and limits#

JSON
{  "error": "invalid_request"}