Skip to main content
Pipedream’s SDKs make it easier to access the Connect API. Check out installation instructions for the TypeScript, Python, and Java SDKs below.

Official SDKs

TypeScript SDK

The TypeScript SDK can be used in both browser and server environments, enabling you to build full-stack applications with Pipedream Connect.

Installation

To install the SDK from npm, run:
npm i --save @pipedream/sdk
You can also load the client-side SDK via <script> tag. You can run the latest version:
<script src="https://unpkg.com/@pipedream/sdk/dist/browser/index.js"></script>
or a specific version:
<script src="https://unpkg.com/@pipedream/sdk@1.0.6/dist/browser/index.js"></script>

Server Usage

Most of your interactions with the Connect API will likely happen on the server, to protect API requests and user credentials. You’ll use the SDK in your frontend to let users connect accounts. Once connected, you’ll use the SDK on the server to retrieve account info, invoke workflows on their behalf, and more.
import { PipedreamClient } from "@pipedream/sdk";

const client = new PipedreamClient({
  clientId: process.env.PIPEDREAM_CLIENT_ID,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET,
  projectId: process.env.PIPEDREAM_PROJECT_ID,
  projectEnvironment: "development", // or "production"
});

// Create a connect token for a user
async function createConnectToken(externalUserId) {
  const token = await client.tokens.create({ externalUserId });
  return token;
}

// The client provides methods to interact with the Connect API
// Use with any Node.js framework: Express, Next.js, Fastify, Hono, etc.

Browser Usage

You’ll primarily use the browser client to let your users securely connect apps from your frontend. When making calls from the browser, you’ll use short-lived Connect tokens to authenticate requests. Tokens expire after 4 hours, so you should provide a tokenCallback. The callback calls your backend to fetch a fresh token whenever the SDK needs one, so you don’t have to manage expiry yourself.
  1. Create a short-lived Connect token on your server
  2. Configure tokenCallback in the browser to call that server endpoint and return the token string
  3. Connect the user’s account or make whatever calls you need — the SDK will invoke tokenCallback whenever it needs to refresh the token
import { PipedreamClient } from "@pipedream/sdk";

const externalUserId = "user_123";

const client = new PipedreamClient({
  projectEnvironment: "development",
  externalUserId,
  tokenCallback: async () => {
    const res = await fetch("/api/connect-token", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ external_user_id: externalUserId }),
    });
    return res.json();
  },
});

// Connect an account
client.connectAccount({
  app: "slack",
  onSuccess: ({ id }) => console.log(`Connected: ${id}`),
});
With tokenCallback configured, client.connectAccount (and other browser calls) no longer needs a token argument — the SDK fetches and refreshes tokens on demand.

Python SDK

The Python SDK is for server-side use. Install it to build backend services and APIs that interact with Pipedream Connect as part of your full-stack application.

Installation

To install the SDK from pip, run:
pip install pipedream

Usage

from pipedream import Pipedream

# These secrets should be saved securely and passed to your environment
pd = Pipedream(
    client_id="{oauth_client_id}",
    client_secret="{oauth_client_secret}",
    project_id="{project_id}",
    project_environment="development"  # or "production"
)

# The client provides methods to interact with the Connect API

Java SDK

The Java SDK is for server-side use in JVM-based applications. Use it to build Java backends, Spring Boot applications, and other JVM services that integrate with Pipedream Connect.

Installation

To install the SDK with Maven, add this dependency to your pom.xml:
<dependency>
    <groupId>com.pipedream</groupId>
    <artifactId>pipedream-java</artifactId>
    <version>1.0.0</version>
</dependency>
For Gradle, add this to your build.gradle:
implementation 'com.pipedream:pipedream-java:1.0.0'

Usage

Like the Python SDK, the Java SDK is designed for server-side applications. Use it to securely manage user connections, retrieve account info, and interact with the Connect API from your Java backend.
import com.pipedream.api.BaseClient;

// These secrets should be saved securely and passed to your environment
BaseClient client = BaseClient
    .builder()
    .clientId("{oauth_client_id}")
    .clientSecret("{oauth_client_secret}")
    .projectId("{project_id}")
    .projectEnvironment("development") // or "production"
    .build();

// The client provides methods to interact with the Connect API

Postman Collection

Run in Postman

Postman Collection

Use Pipedream’s Postman Collection to explore and test the Connect API

OpenAPI Specification

OpenAPI Specification

Explore Pipedream’s OpenAPI specification to see the full list of endpoints and parameters
I