Skip to main content
A connected app is an app a User approved to act on their behalf in one Organization. Sintropix is an OAuth 2.1 authorization server: the app sends the User to Sintropix, the User signs in and approves, and the app receives an access token it sends as Authorization: Bearer <token> on API requests. Use OAuth when your app acts for Users who sign in themselves, such as an AI assistant or a third-party tool. Use an API key for your own server-to-server integration. Claude and ChatGPT connect this way through the Sintropix MCP server.

What a token can do

  • One Organization. The User picks one Organization when approving. The token reaches only the Entities of that Organization. Any other Entity returns 404, and GET /api/organizations lists at most that one Organization. The same app approved for two Organizations is two connected apps, each revoked on its own.
  • Read, or read and write. The app asks for the read scope, and for write if it needs to change data. The User’s Role caps the result: a viewer approves read only, even when the app asks for write.
  • Never beyond the Role. The token acts with the User’s current Role. If the User’s Role becomes viewer, a read-and-write token stops writing. If the User loses the Membership, the approval and its tokens end.
  • Declared Reason on writes. Every POST, PUT, PATCH, or DELETE must send x-audit-reason, with the same rules as for API keys. x-audit-actor isn’t needed: the Audit Trail records credentialType: "oauth" and the app’s client_id and name. The one exception is POST /api/feedback: it needs no x-audit-reason, and a token with read access can send it too.
  • No account management. A token is refused on Superadmin routes (SUPERADMIN_SESSION_REQUIRED), on API key management, on listing or revoking connected apps, on two-step verification settings, and on every /api/auth/* route outside the OAuth flow.

Endpoints

Sintropix publishes its authorization server metadata at:

Connect your app

1

Register the app

Register once, with no credentials. Sintropix issues a public client: there is no client secret, so PKCE protects the flow.
Keep the client_id from the response. client_name is what Users see on the approval screen and in their list of connected apps.The redirect URIs you can register depend on where your app runs:Any other redirect URI, such as a custom scheme with a host like acme://callback, returns 400 with invalid_redirect_uri.
2

Send the User to approve

Create a PKCE code verifier and its S256 challenge, then open the authorization URL in the User’s browser:
The redirect_uri must match one you registered exactly. If you send a resource, it must be the Sintropix MCP server, https://mcp.sintropix.com/mcp. Any other resource sends the User back to your redirect_uri with error=invalid_target.The User then goes through these screens in the Sintropix app:
  1. Signs in with their password and second factor. A User without two-step verification is asked to set it up first.
  2. Picks the Organization the app will work in (Elige la empresa). A User with one Membership skips this screen. A User with no Membership can’t approve any app.
  3. Reviews the request: the app name, the domain it returns to (Te devolverá a), the Organization, and the access (Solo lectura or Lectura y escritura). The User clicks Permitir or Denegar.
The app name is the app’s own claim, so the screen also shows where the User goes back to. An https redirect shows its hostname. Any other scheme shows the whole URI.
3

Exchange the code

Sintropix redirects to your redirect_uri with code and state. Check state, then exchange the code with the code verifier:
The response holds access_token, refresh_token (when you asked for offline_access), expires_in, and the granted scope. Read the granted scope: it has no write when the User’s access is read only.
4

Call the API

Send the access token as a Bearer token. Writes also need x-audit-reason:
When a request returns 401, refresh the token. An access token also ends when the User signs out of the browser session they approved the app from, but its refresh token keeps working.
If the refresh fails, the User revoked the app or lost the Membership. Send them through the approval again.

Manage connected apps

Users see their connected apps in the Sintropix app under Tu cuenta > Apps conectadas, at https://app.sintropix.com/account/connected-apps. To get there, click your name at the bottom of the left sidebar and choose Tu cuenta. Each row shows the app, its return domain, the Organization, the access, and the connection date. Click the revoke button on a row and confirm with Revocar: the app’s access and refresh tokens stop working at once. Revoking one Organization’s approval leaves the same app’s approvals in other Organizations. The same actions are available over the API, from a signed-in browser session only. An API key or an OAuth token gets 403 with PERMISSION_DENIED_ERROR.

GET /api/connected-apps

List the apps the signed-in User approved, one row per approval.

DELETE /api/connected-apps/:connectedAppId

Revoke one approval and every token it issued. Returns 200 with the revoked connected app in the shape above. An id that isn’t one of your approvals returns 404 with CONNECTED_APP_NOT_FOUND_ERROR.

Error codes

An expired, revoked, or unknown access token returns 401.