Skip to content

Latest commit

 

History

History
211 lines (138 loc) · 21.4 KB

File metadata and controls

211 lines (138 loc) · 21.4 KB

Integrations

(integrations)

Available Operations

  • list - Returns a list of integrations including their unique keys and providers as configured in the Nango API.
  • create - Create a new integration including its provider configuration, OAuth details if applicable, and associated integration ID.
  • update - Edit an integration, specifically tailored for OAuth APIs, updating the provider configuration along with OAuth client ID and secret.
  • get - Returns details of a specific integration identified by its provider configuration key, optionally including credentials if specified.
  • delete - Deletes a specific integration identified by its provider configuration key.

list

Returns a list of integrations

Example Usage

import { Nango } from "@speakeasy-sdks/nango";

const nango = new Nango();

async function run() {
  const result = await nango.integrations.list();

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<components.IntegrationsResponse200>

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

create

Create a new integration

Example Usage

import { Nango } from "@speakeasy-sdks/nango";

const nango = new Nango();

async function run() {
  const result = await nango.integrations.create({});

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request components.ListIntegrationsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<components.IntegrationsResponse200>

Errors

Error Object Status Code Content Type
errors.Response400 400 application/json
errors.SDKError 4xx-5xx /

update

Edit an integration (only for OAuth APIs)

Example Usage

import { Nango } from "@speakeasy-sdks/nango";

const nango = new Nango();

async function run() {
  const result = await nango.integrations.update({});

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request components.UpdateIntegrationRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<components.IntegrationsResponse200>

Errors

Error Object Status Code Content Type
errors.Response400 400 application/json
errors.Response404 404 application/json
errors.SDKError 4xx-5xx /

get

Returns a specific integration

Example Usage

import { Nango } from "@speakeasy-sdks/nango";

const nango = new Nango();

async function run() {
  const result = await nango.integrations.get("<value>", false);

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
providerConfigKey string ✔️ The integration ID that you created in Nango.
includeCreds boolean If true, the response will contain the client ID, secret, scopes, auth_mode and app link - if applicable. include_creds is false by default.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<components.GetIntegrationResponse>

Errors

Error Object Status Code Content Type
errors.Response400 400 application/json
errors.Response404 404 application/json
errors.SDKError 4xx-5xx /

delete

Deletes a specific integration

Example Usage

import { Nango } from "@speakeasy-sdks/nango";

const nango = new Nango();

async function run() {
  await nango.integrations.delete("<value>");

  
}

run();

Parameters

Parameter Type Required Description
providerConfigKey string ✔️ The integration ID that you created in Nango.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<void>

Errors

Error Object Status Code Content Type
errors.Response400 400 application/json
errors.Response404 404 application/json
errors.SDKError 4xx-5xx /