Pipedream provides TypeScript, Python, and Java SDKs along with a REST API to interact with the Connect service. You’ll find examples using the SDKs and the REST API in multiple languages below.

REST API base URL

Pipedream Connect resources are scoped to projects, so you’ll need to pass the project’s ID as a part of the base URL or when initializing the SDK client. Visit your project’s Settings to find the project ID.
https://api.pipedream.com/v1/connect/{project_id}

External users

When you use the Connect API, you’ll pass an external_user_id parameter when initiating account connections and retrieving account info. This is your user’s ID, in your system — whatever you use to uniquely identify them. Pipedream associates this ID with user accounts, so you can retrieve account info for a specific user, and invoke actions on their behalf. External User IDs are limited to 250 characters. Read more about external users.

Environment

Most API endpoints require an environment parameter. This lets you specify the environment (production or development) where resources will live in your project. Always set the environment when you create the SDK client:
import { PipedreamClient } from "@pipedream/sdk";
 
const client = new PipedreamClient({
  clientId: "your-oauth-client-id",
  clientSecret: "your-oauth-client-secret",
  projectId: "your-project-id",
  projectEnvironment: "development" // change to "production" for production environment
});
or pass the X-PD-Environment header in HTTP requests:
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/tokens \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: development" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "your-external-user-id"
  }'
Pipedream’s SDKs make it easier to access the REST APIs. Check out installation instructions and more info in our SDKs guide.