Import a connection
/connection
curl --request POST \
--url https://api.nango.dev/connection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"connection_id": "<connection_id>",
"provider_config_key": "<provider_config_key>"
}'
This response has no body data.
When to use
Use this API endpoint to import existing access tokens into Nango. It is mostly meant for one-off import scripts.
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.
Body
(OAuth 2, required) Existing access token.
(API Key, required) API key to be attached to the connection.
(OAuth, required for some APIs) Additional configuration to be attached to the connection.
The connection ID used to create the connection.
(OAuth 2, optional) Safer and preferred.
(OAuth 2, optional) In seconds.
(OAuth, required for some APIs) Metadata to be attached to the connection.
(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.
(Basic, required) password to be attached to the connection.
The integration ID that you created on Nango.
(OAuth 2, optional) Pass the refresh token if you have it.
(Basic, required) username to be attached to the connection.
curl --request POST \
--url https://api.nango.dev/connection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"connection_id": "<connection_id>",
"provider_config_key": "<provider_config_key>"
}'
This response has no body data.