Pipedream Connect
Environments

Environments

Pipedream Connect projects support two environments: development and production.

  1. Connected accounts and credentials stored in development remain separate from production.
  2. In development, you can use the official Pipedream OAuth clients, so you can test integrations without creating your own OAuth client, and you can also use features that are typically only available on higher paid tiers, like running workflows on behalf of your end users.

How to specify environment

You specify the environment when creating a new Connect token with the Pipedream SDK or API. By default, the enviromment is set to production. When users succesfully connect their account, Pipedream saves it for that external_user_id in the specified environment.

Always set the environment when you create the SDK client:

import { createBackendClient } from "@pipedream/sdk";
 
const pd = createBackendClient({
  environment: "development", // change to production if running for a test production account, or in production
  credentials: {
    clientId: "your-oauth-client-id",
    clientSecret: "your-oauth-client-secret",
  }
});

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"
  }'