Quickstart (1/2): Access an API
⏱️ 5 minutes to complete
Create an integration
Sign up for a Nango account (free, no credit card):
Go 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.
⚠️ Required for OAuth APIs
⚠️ Required for OAuth APIs
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.
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.
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:
- Nango secret key from your Environment Settings
- Integration ID from your Integrations
- Connection ID from your Connections
Install Nango’s backend SDK with npm i @nangohq/node
. Then run:
Install Nango’s backend SDK with npm i @nangohq/node
. Then run:
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.