Skip to content
Documentation menu
docs / api / post-oauth-token
Keys and account

POST/oauth/token

Access and price

AuthNo key. Not metered.
PriceNot metered: no quota, no credit.

What it does

Request bodies are application/x-www-form-urlencoded (RFC 6749 §4.1.3 : JSON is not an accepted encoding here and a client sending it gets an honest invalid_request), and every error body is RFC 6749 shaped.

Call it

bash
curl -fsS -X POST "https://api.mapmap.ai/oauth/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d @request.json

Request body

application/x-www-form-urlencoded

grant_type=authorization_code&code=…&redirect_uri=…&client_id=…&code_verifier=… or grant_type=refresh_token&refresh_token=…&client_id=…

The OpenAPI document declares this body as a free-form JSON object with no field list, so there is nothing here to generate a table from. The prose above is what the gateway states about it; the raw document is the authority.

Responses

200Access/refresh pair
FieldTypeRequiredDescription
access_tokenstringnoThe sno_… access token.
expires_inintegernoAccess token lifetime, seconds.
refresh_tokenstringnoThe snr_… refresh token. Each use returns a new one.
scopestringnoThe granted scope.
token_typestringnoAlways Bearer.

Example: A response assembled from this schema's own field examples, enums, defaults and types; not a recorded call

json
{
  "access_token": "string",
  "expires_in": 0,
  "refresh_token": "string",
  "scope": "string",
  "token_type": "string"
}
400RFC 6749 error object (invalid_request, invalid_grant, invalid_client, unsupported_grant_type); never problem+json

application/json · OAuthError

413The request declares a body larger than 1048576 bytes (plain text, not problem+json)

text/plain

504The request did not finish within the gateway's request deadline (request-timeout)

application/problem+json · Problem

Error bodies follow the shared problem model documented on API conventions.

Also under Keys and account

Generated from https://api.mapmap.ai/openapi.json on 2026-11-12 · operationId token