Upsert a connection
Connections
Import a connection
Upserts a connection for which you already have credentials.
POST
Upsert a connection
Requires an API key with the
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
application/json
The integration ID that you created on Nango.
The credentials to be attached to the connection.
- OAuth1
- OAuth2
- Basic Auth
- Api Key
- OAuth2 Client
- Unauthenticated
- TBA
- GitHub App
(OAuth, required for some APIs) Metadata to be attached to the connection.
The connection ID used to create the connection.
(OAuth, required for some APIs) Additional configuration to be attached to the connection.
Connection tags (key/value strings). Keys are normalized to lowercase.
Deprecated, use tags instead
Response
Successfully created an integrations
Connection tags (key/value strings). Keys are normalized to lowercase.
- OAuth1
- OAuth2
- Basic Auth
- Api Key
- GitHub App
- JWT
- OAuth2 Client
- App Store
- Unauthenticated
- Custom
- TBA
- Bill
- Two Step
- Signature