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.
Authenticating requests
Pass your secret key as a Bearer token in theAuthorization header on every API request.
curl
Node SDK
Install the SDK and pass your secret key when instantiating the client: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:Error responses
If a request is missing or includes an invalid secret key, the API returns a401 Unauthorized response.
Missing Authorization header:
Authorization header (not a valid Bearer token):