Skip to main content
The Nango API uses Bearer token authentication. Every request to https://api.nango.dev must include your secret key in the Authorization header.

API keys

Nango provides two types of API keys, each with a distinct purpose:

Secret key

Used for server-side API calls. Grants full access to your Nango environment. Never expose this key in client-side code or public repositories.

Public key

Used for frontend integrations (for example, initializing the Nango Connect UI). Has limited, read-only access scoped to the auth flow.
To find your keys, go to Settings > API Keys in the Nango dashboard.
Your secret key provides full access to your Nango environment. Treat it like a password — store it in environment variables, never in source code.

Authenticating requests

Pass your secret key as a Bearer token in the Authorization header on every API request.

curl

Node SDK

Install the SDK and pass your secret key when instantiating the client:
The secretKey field is required. The SDK throws an error at construction time if it is missing.
The Node SDK defaults to https://api.nango.dev as the host. If you are self-hosting Nango, pass the host option:

Environment variables

Store your secret key in an environment variable to keep it out of source code:
Then reference it in your application:

Error responses

If a request is missing or includes an invalid secret key, the API returns a 401 Unauthorized response. Missing Authorization header:
Malformed Authorization header (not a valid Bearer token):
Unknown or revoked secret key: