Import a connection (deprecated)
Adds a connection for which you already have credentials. This endpoint is deprecated, use the /connections endpoint instead.
environment:connections:create scope. Learn more about API key scopes.When to use
Use this API endpoint to import existing access tokens into Nango. It is mostly meant for one-off bulk imports when onboarding Nango, or for migrating existing connections when a provider introduced changes to its auth flow. If a connection with the sameconnection_id and provider_config_key already exists, the endpoint updates it with the provided credentials instead of creating a new one.
To trigger OAuth flows with Nango, use the Nango frontend SDK.
Request body
You can use this endpoint to import OAuth 2, OAuth 1, API Keys, and Basic auth credentials. The required fields depend on the type of authentication of the connections you are trying to import.Authorizations
The secret key from your Nango environment.
Body
The integration ID that you created on Nango.
The connection ID used to create the connection.
(OAuth 2, required) Existing access token.
(OAuth 2, optional) Pass the refresh token if you have it.
(OAuth 2, optional) Safer and preferred.
(OAuth 2, optional) In seconds.
(OAuth2, optional) If the provider gives access tokens that don't expire, pass in true to avoid an import validation error.
(OAuth2, optional) Override the integration's OAuth client id
(OAuth2, optional) Override the integration's OAuth client secret
(OAuth 1, required) The client token to be attached to the connection.
(OAuth 1, required) The client token secret to be attached to the connection.
(OAuth, required for some APIs) Metadata to be attached to the connection.
(OAuth, required for some APIs) Additional configuration to be attached to the connection.
(Basic, required) username to be attached to the connection.
(Basic, required) password to be attached to the connection.
(API Key, required) API key to be attached to the connection.
Response
Successfully created an integrations