Skip to main content
The backend SDK lets you interact with the Nango API. It is available on NPM as @nangohq/node.

Instantiate the backend SDK

Install it with your favorite package manager, e.g.:
Instantiate the Nango class:
Parameters

Rate limits

The Nango SDK is rate-limited to prevent abuse and ensure fair usage across all clients. The rate limit is enforced on a per-account basis, with a fixed window of time and a maximum number of requests allowed within that window. If a client exceeds the rate limit, the API will respond with a 429 Too Many Requests status code. In this case, the Retry-After header is included, indicating the number of seconds the client should wait before making another request to avoid being rate-limited. To handle rate limiting gracefully, clients should monitor for the 429 status code and honor the Retry-After header value provided in the response.

Integrations

List all integrations

Returns a list of integrations.
Example Response

Get an integration

Returns a specific integration.
Parameters Example Response

Create an integration

Create a new integration.
Parameters Example Response

Update an integration

Patch an integration. The first argument identifies the integration; all body fields are optional and only the fields you pass are updated.
Parameters Example Response

Delete an integration

Deletes a specific integration.
Parameters Example Response

Connect

Create a connect session

Create a connect session. The token is short-lived and lasts for 30 minutes.
Parameters Returns

Create a reconnect session

Create a reconnect session for a given connection_id. You can pass tags to update connection attribution during reconnection. Use this method when a user needs to input new credentials or to manually refresh token.
This method is only compatible with connection_id created with a session token.
Parameters Returns

Connections

List connections

Returns a list of connections without credentials.
Parameters Example Response

Get a connection (with credentials)

Returns a specific connection with credentials.
The response content depends on the API authentication type (OAuth 2, OAuth 1, API key, Basic auth, etc.).If you do not want to deal with collecting & injecting credentials in requests for multiple authentication types, use the Proxy (step-by-step guide).
When you fetch the connection with this API endpoint, Nango will check if the access token has expired. If it has, it will refresh it.We recommend not caching tokens for longer than 5 minutes to ensure they are fresh.
Parameters Example Response

Patch a connection

Patch a connection.
Parameters Example Response

Get connection metadata

Returns a connection’s metadata.
If you know the structure of the metadata, you can specify a type;
Parameters Example Response

Set connection metadata

Set custom metadata for the connection or connections (overrides existing metadata).
Parameters Response

Edit connection metadata

Edit custom metadata for the connection or connections. Only overrides specified properties, not the entire metadata.
Parameters Response

Delete a connection

Deletes a specific connection.
Parameters Response Empty response.

Wait for connection

Waits for a connection to be created for a given end user and integration. This is useful in agentic flows where you need to wait for a user to complete the OAuth flow before proceeding.
This method polls for a connection every 2 seconds for up to 60 seconds (30 attempts). If no connection is found within this time, it will throw a timeout error.
Parameters Example Response

Integration functions

List functions

Returns the functions deployed to an integration, with pagination.
Filter by function type, name, or page:
Parameters Example Response

Get a function

Retrieves a deployed function of an integration.
Pass type to disambiguate when a sync and an action share the same name:
Parameters Example Response

Get function code

Retrieves the source code of a deployed function.
Parameters Example Response

Delete a function

Deletes a deployed function of an integration. The type is required.
Parameters Example Response

Get integration functions config

Return the configuration for all integration functions
Example Response You can also pass in an optional argument with the value of nango or openai. The default is nango

Syncs

Get records

Returns the synced data.
Parameters Example Response
This endpoint returns a list of records, ordered by modification date ascending. If some records are updated while you paginate through this endpoint, you might see these records multiple times.

Prune records

Prunes record payloads from Nango’s cache for a given model and connection up to a specified cursor. The payload is emptied but record metadata is retained. Payload can be restored by re-syncing the data.
Parameters Response

Trigger sync(s)

Triggers an additional, one-off execution of specified sync(s) for a given connection or all applicable connections if no connection is specified.
Parameters Response Empty response.

Start schedule for sync(s)

Starts the schedule of specified sync(s) for a given connection or all applicable connections if no connection is specified. Upon starting the schedule, the sync will execute immediately and then continue to run at the specified frequency. If the schedule was already started, this will have no effect.
Parameters Response Empty response.

Pause schedule for sync(s)

Pauses the schedule of specified sync(s) for a given connection or all applicable connections if no connection is specified.
Parameters Response Empty response.

Sync status

Get the status of specified sync(s) for a given connection or all applicable connections if no connection is specified.
Parameters Response

Override sync connection frequency

Override a sync’s default frequency for a specific connection, or revert to the default frequency.
Parameters Response

Create sync variant

Creates a new sync variant for a specific connection. Sync variants allow you to run multiple instances of the same sync with different configurations.
Parameters Example Response

Delete sync variant

Deletes a sync variant for a specific connection.
Parameters Example Response

Get environment variables

Retrieve the environment variables as added in the Nango dashboard.
Parameters No parameters. Response

Actions

Trigger an action

Triggers an action for a connection.
Parameters Response
The output of an action cannot exceed 10MB.

Trigger an action asynchronously

Triggers an action asynchronously for a connection. This allows you to start an action and retrieve the results later.
Parameters Response

Get async action result

Retrieves the result of an asynchronous action.
Parameters Response

Proxy

Makes an HTTP request using the proxy:
Parameters Response

Providers

List all providers

Returns a list of providers.
Example Response

Get a provider

Returns a specific provider.
Example Response

Get provider templates

Returns the function templates available for a provider.
Parameters Example Response

Webhooks from Nango

Verify Webhook Signature

Asserts that a Webhook is coming from Nango’s backend. Verification uses webhookSigningKey when the client is constructed with one, otherwise it falls back to secretKey. On environments created after 2026-04-20 (or any environment that later rotated its API key), the signing key differs from the API key, so construct the client with webhookSigningKey (from Environment Settings > Webhooks > Signing key).
Questions, problems, feedback? Please reach out in the Slack community.