Makini
v4 (Latest)
  • v4 (Latest)
  • v3 (Legacy)
User Guide
API ReferenceMCPPlatforms
User Guide
API ReferenceMCPPlatforms
Website
v4 (Latest)
  • v4 (Latest)
  • v3 (Legacy)
v4 (Latest)
  • v4 (Latest)
  • v3 (Legacy)
  1. Working with the API
  • Getting Started
    • On-premise systems
    • Authentication
    • Testing with API Tools
    • Account setup
    • Connection Credits
  • Core Concepts
    • Connections
    • Unified Data Model
    • Custom mappings
    • Data mappings
    • Sync schedules and history
  • Admin API
  • Account & Team
    • Team access and SSO
  • Makini Link
    • Embedded connection settings
    • Launching Makini Link
    • Magic links
  • Management API
    • Management API authentication
    • Managing connections
    • Managing your application
  • Webhooks
    • Signatures and retries
    • Webhook events
  • Working with the API
    • Access tokens
    • Errors
    • Filtering
    • Makini Query Language
    • Raw data and passthrough
    • Reading data
    • Relations and expand
    • Writing data
  1. Working with the API

Access tokens

The Makini API uses standard OAuth 2.0 access tokens, and a single connection-scoped token opens one customer's connected system to your application. POST /oauth/token issues tokens and POST /oauth/revoke revokes them.
Request
Response

Choose a grant#

Client credentials
client_credentials gives your application its own token. It carries no connection, so it cannot read or write connection data.
Authorization code
authorization_code is the Makini Link code exchange. It returns a connection-scoped token that reads and writes one connection's data.
Refresh token
refresh_token returns a new connection-scoped token from a refresh token.
A connection-scoped token carries a connection_id claim (sub stays your client id), and the token response includes connection_id too.

Send the request#

Both endpoints take a form body: send Content-Type: application/x-www-form-urlencoded. POST /oauth/token also accepts a JSON object with the same parameters as string values under Content-Type: application/json. Any other content type is a 400.
Put your client credentials either in HTTP Basic authentication (both values form-urlencoded before base64 encoding) or in the client_id and client_secret body fields, never both.

Get a connection token#

1
Send your customer through Makini Link
Your customer connects their system in Makini Link. When they finish, Link sends them back to your redirect_uri with a code. See Launching Makini Link.
2
Exchange the code
On your server, call POST /oauth/token with the authorization_code grant and the code, as in the example above. redirect_uri is optional; if you send it, it must match the one used during authorization exactly, byte for byte.
Don't send a scope parameter. Makini scopes a connection token during the exchange and again on every refresh, so neither the authorization_code nor the refresh_token grant accepts one.
3
Store the connection and the refresh token
Keep connection_id and refresh_token with your customer's account. The access token is valid for 3,600 seconds (expires_in in the response).
4
Refresh before the token expires
Exchange the refresh token for a new pair, and store the new refresh token in place of the old one:

Keep tokens fresh#

Refresh tokens rotate on every use. Each refresh returns a new access token and a new refresh token, and the one you presented stops working. Always store the newest one.
Never retry a refresh with an old value
Presenting a refresh token that was already rotated away is treated as theft: it revokes the whole token family, including the access tokens already issued from it.
TokenLifetime
Access token3,600 seconds (expires_in in the response).
Refresh token30 days from its last use.
A refresh token you keep using stays alive. One that goes unused for 30 days expires; send the user through Makini Link again.
A client_credentials response never includes a refresh token. On rare occasions a code exchange answers without one too, so treat refresh_token as optional and keep using the access token until it expires.

Revoke access#

POST /oauth/revoke with a refresh token revokes its whole family and immediately stops every access token issued from it. Pass the refresh token, not an access token: access tokens are self-contained and not stored, so revoking the refresh token is what stops them.
No client authentication is needed, because holding the token is the credential. token_type_hint is accepted and ignored.
Revocation answers 200 whether or not the token existed, so it cannot be used to test whether a token is valid. The exceptions are a missing token parameter (400) and a temporary outage (503).

Reference#

Scopes
Discovery
Errors

Next steps#

Launching Makini Link
Send your customers through Link to get the code you exchange.
Reading data
Put your connection token to work on the entity endpoints.
Modified at 2026-10-16 14:20:56
Previous
Webhook events
Next
Errors
Built with