Skip to main content
1

Create an integration

Sign up for a Nango account (free, no credit card): Try Nango CloudGo to the Integrations tab, click Configure New Integration and select the API to integrate with.APIs have different ways to authorize requests: OAuth, API key, Basic, custom. Nango abstracts away the difficulties of working with each one.
OAuth APIs require you to register your OAuth application on their developer portal.When registering, the API provider will prompt you for the Callback URL. Use the URL displayed in the Nango integration settings. Remember to register the required scopes in the Nango integration settings and, if necessary, with the API provider.Collect your OAuth app’s Client ID and Client Secret from the API portal and input them in your Nango integration settings.
Each API has a dedicated Nango documentation page with useful links, gotchas, etc.
2

Authorize your external account

If you don’t have one already, create a test account for the external system you want to integrate with.On the Nango Connections tab, click Add Test Connection to test the authorization flow. Pick an integration, click Authorize and enter your test account credentials to authorize the API.Once authorized, go to the Connections tab to see the newly created connection. The “Authorization” sub-tab contains the credentials necessary to consume the external API. These credentials are securely stored and automatically refreshed by Nango.
3

Access the external API

Let’s make an API request to the external API.You will need to copy/paste the following values in the code snippet below:
  • Node
  • cURL
Install Nango’s backend SDK with npm i @nangohq/node. Then run:
import { Nango } from '@nangohq/node';

const nango = new Nango({ secretKey: '<NANGO-SECRET-KEY>' });

const res = await nango.post({
    endpoint: '/external-endpoint',
    providerConfigKey: '<INTEGRATION-ID>',
    connectionId: '<INTEGRATION-ID>',
    data: { "key": "value" }
});

console.log(res.data);
Alternatively, you can fetch credentials from Nango on-the-fly and make API requests without using Nango as a proxy (Node SDK / API)
Congrats 🎉 You can now make authorized requests to the external API! Inspect the Logs tab in Nango for details on the requests you made.
Questions, problems, feedback? Please reach out in the Slack community.
I