Manage connect sessions — short-lived tokens that authorize the Connect UI to create connections on behalf of an end user.
A connect session is a short-lived token (30 minutes) that you create server-side and pass to your frontend to initialize the Connect UI. The session encodes which end user is authenticating, which integrations they can connect to, and any connection defaults.This design keeps your secret key off the frontend: your server mints a session token and the browser only ever sees the short-lived token.
All API requests require a secret key passed as a Bearer token. You can find your secret key in the Settings section of the Nango dashboard.
POST /connect/sessionsCreates a new connect session. The session expires after 30 minutes. Pass the returned token to the Connect UI in your frontend.
Tags you set on the session are copied onto the connection when the user completes auth. They also appear in auth webhooks, making it easy to identify which user connected.
Limit which integrations the user can connect to. If omitted, all integrations in your environment are available. Each entry is an integration unique_key.
Key-value tags copied onto the resulting connection. Common keys: end_user_id, end_user_email, organization_id. You can also add custom keys. When tags is provided at the top level, end_user becomes optional.
POST /connect/sessions/reconnectCreates a session specifically for re-authenticating an existing connection. Use this when a connection’s credentials have expired or been revoked and you need the user to re-authorize.The resulting session opens the Connect UI pre-scoped to the specific connection being repaired, rather than allowing the user to choose any integration.
GET /connect/sessionRetrieves the details of a connect session. Authenticate this request with the session token (not your secret key) as the Bearer token.This endpoint is primarily used by the Connect UI itself to load session configuration. You generally do not need to call it directly.
DELETE /connect/sessionImmediately invalidates a connect session. The session token can no longer be used to open the Connect UI.Use this if the user cancels the flow on your side before completing auth and you want to clean up.