Documentation Index
Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Nango Auth lets your users connect 700+ external APIs to your product. You embed a Nango-managed auth flow in your application, and Nango handles authorization, credential storage, refresh, and validation. A Connection is created after each successful authorization. It stores one user’s credentials for one external API and keeps them valid over time. Credentials can be retrieved at scale or used directly by other Nango primitives — without ever passing through your codebase.How it works
The end-to-end flow has four steps:- Backend — your server asks Nango for a short-lived session token.
- Frontend — your app opens the Nango Connect UI with that token.
- User — authorizes the API. Nango stores the credentials.
- Backend — Nango sends an auth webhook with the connection ID. You persist it alongside your user/org/project.
- TypeScript
- cURL
Capabilities
- Auth schemes — OAuth 2.0, OAuth 1.0a, API keys, basic auth, custom. 700+ APIs supported; new ones added on demand within days, by request or self-contributed.
- Pre-built UI — Embedded Connect UI with API-specific guidance, input validation, and your branding. Or customize Connect UI or build a custom UI.
- Credential management — Encrypted storage, automatic refresh, retrieval at scale. Combine with Proxy or Functions to avoid handling credentials directly.
- Observability — Failure detection, reconnect flow, and per-connection logs.
Guide
Create a Nango account
Sign up for free (no credit card): 
For agents
For agents
Signup cannot be automated. Ask the user to sign up at app.nango.dev/signup and provide their Nango API key from the Environment settings tab > API Keys. Use it as
Authorization: Bearer <NANGO-API-KEY> in API requests.The default API key created on signup has full access and is the simplest option.If the user creates a scoped API key instead, this guide needs environment:integrations:write (step 2) and environment:connect_sessions:write (steps 5 and 8). See API keys.Create an integration
In the dashboard, open the Integrations tab, click Configure New Integration, and pick the API.
⚠️ OAuth developer apps
⚠️ OAuth developer apps
OAuth APIs require an OAuth developer app registered with the provider. Register one on the provider’s developer portal, use the
Callback URL shown in your Nango integration settings, then paste the Client ID and Client Secret back into Nango. Register any required scopes too.If this integration will be used in production, complete the optional custom callback URL step below before real users connect. Retrofitting a callback URL later requires updating the provider app and can break new authorization or reconnect flows until the provider and Nango settings match.For OAuth 2.0 providers, Nango shows suggested scopes — auto-discovered and refreshed at least monthly. They’re suggestions; you can use any scope the provider supports.For popular APIs, Nango ships a built-in shared developer app so you can test connections with zero setup. Do not use it in production — it violates most providers’ terms of service and is rate-limited and unreliable. Always register your own OAuth app before going live.
For agents
For agents
Create the integration with the API. If you need the provider slug first, list providers and use the matching provider’s For OAuth providers, walk the user through registering an OAuth developer app on the provider’s portal: link them to the provider’s OAuth-app creation page, tell them which For all fields and response shapes, see the List all providers API, Create an integration API, and Update an integration API.
name field:Callback URL to paste (visible in the Nango integration settings after creation), and ask them to send back the client_id and client_secret so you can pass them in the request body.- cURL (OAuth2)
- cURL (API key / basic)
Configure a custom OAuth callback URL (optional, recommended)
For production OAuth apps, a callback URL on your own domain is recommended. Some providers show the callback domain to users.To configure a custom callback URL:
- Add an endpoint on your domain (e.g.
https://example.com/oauth-callback) that 308-redirects tohttps://api.nango.dev/oauth/callback, preserving all query parameters. - Update the registered callback URL with each API provider — otherwise they’ll reject new authorization flows.
- After confirming steps 1 and 2, update the callback URL in Nango’s Environment Settings. Settings are per-environment, so repeat for every environment.
For agents
For agents
Ask the user what production callback URL they want to use, then have them add a 308 redirect from that URL to
https://api.nango.dev/oauth/callback before they register provider OAuth apps. The Nango environment setting is dashboard-only — ask the user to paste the final callback URL into Environment Settings > Backend.Generate a session token (backend)
Set up a backend endpoint that your frontend will call before each authorization attempt to retrieve a session token from Nango (API / Node SDK).You’ll need an API key with the
environment:connect_sessions:write scope (find it in Environment Settings > API Keys).- Node
- cURL
ℹ️ Tags
ℹ️ Tags
allowed_integrations controls what the user sees:- Multiple integrations — Connect UI shows a picker.
- Single integration — Connect UI sends the user straight to its auth flow.
Trigger the auth flow (frontend)
Load the Nango frontend SDK, fetch the session token from your backend, and open Connect UI:
See the Frontend SDK reference for more options.The pre-built Connect UI is recommended but optional — if you need full UX control, follow Customize Connect UI. For email/cross-device flows, see Share a connect link.

Listen for webhooks & save the connection ID (backend)
When authorization succeeds, Nango generates a unique connection ID. You use this ID to manage the connection and retrieve its credentials. You must store it on your side, attached to the user/org/project that owns the connection — Nango doesn’t model that ownership.Set up the webhook in Environment Settings:
Webhook payload:Persist
- Specify a Webhook URL in the Nango UI.
- Enable Send New Connection Creation Webhooks.
- Handle
POSTrequests on that route in your backend.
For agents
For agents
Webhook URL configuration is dashboard-only — there is no public API for environment settings. Ask the user to paste the webhook URL into Environment Settings and enable Send New Connection Creation Webhooks.
connectionId against whichever entity owns the connection in your app.Run the flow
Test the auth flow from your app and verify a connection appears in the Connections tab. Failed attempts are inspectable in the Logs tab.
🎉 You are connected! Next:
For agents
For agents
After the user runs the flow, confirm the connection was created with Auth logs are dashboard-only — if the call returns no connection, ask the user to check the Logs tab for the failure reason.
GET /connections — filter by the tags you set in step 5:- View connections and credentials in the Connections tab.
- Retrieve credentials via the API or Node SDK.
- Build with sync functions, Action functions, webhook functions, or any other Nango function type.
Related guides
- Share a connect link - send authorization links by email, support tools, or cross-device flows.
- Connection tags, configuration, and metadata - store the right connection-level data in the right field.
- Customize Connect UI - customize branding or build your own authorization UI.
- Token refreshing and validity - handle revoked or expired credentials.