Nango
Copy page
Nango is an excellent choice for both development and production environments, particularly when working with OAuth2.1/PKCE flows and complex integrations.
To get started, first set up Nango either through cloud or local deployment, then create your credential, and finally consume the credential through the TypeScript SDK.
Nango setup option 1: Nango Cloud
Step 1: Create a Nango account
Sign up here
Step 2: Save your Nango secret key
After creating your Nango account, navigate to Environment Settings in your dashboard and copy the secret key.
Step 3: Configure your root .env file
Restart your dev server to load the new environment variable:
Step 4: Create a new credential in the Visual Builder using Nango
Nango setup option 2: Nango local
Step 1: Clone the optional services repository
Step 2: Start Nango Services
Inside the agents-optional-local-dev repository, run the following command:
Step 3: Save your Nango secret key
- Open Nango at
http://localhost:3050 - Navigate to Environment Settings and copy the secret key
Step 4: Configure your root .env file
In your root project directory (not inside the agents-optional-local-dev repository), update your .env file:
Restart your dev server to load the new environment variables:
Step 5: Create a new credential in the Visual Builder using Nango
Create a new credential in the Visual Builder using Nango Store as the credential store.
Referencing credentials in SDK
Once you have created a credential in the Visual Builder, you can reference it in the TypeScript SDK for both Bearer Authentication and OAuth2.1/PKCE.
Here is an example of how to reference a credential in the TypeScript SDK for both Bearer Authentication and OAuth2.1/PKCE.
Credential Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier for the credential |
type | CredentialStoreType | Yes | Type of credential store (memory, nango, or keychain) |
credentialStoreId | string | Yes | Identifier for the specific credential store instance |
retrievalParams | object | Yes | Parameters for retrieving the credential from the store. |