The Pipedream Connect API uses OAuth to authenticate requests.We use OAuth for a few reasons:✅ OAuth clients are tied to the Pipedream workspace, administered by workspace admins
✅ Tokens are short-lived
✅ OAuth clients support scopes, limiting access to specific operations
✅ Limit access to specific Pipedream projects (coming soon!)
Since API requests are meant to be made server-side, and since grants are not tied to individual end users, all OAuth clients are Client Credentials applications.
In the client credentials model, you exchange your OAuth client ID and secret for an access token. Then you use the access token to make API requests.Pipedream offers TypeScript and Python SDKs, which abstract the process of generating and refreshing fresh access tokens.
Copy
Ask AI
import { PipedreamClient } from "@pipedream/sdk";const client = new PipedreamClient({ clientId: "YOUR_CLIENT_ID", clientSecret: "YOUR_CLIENT_SECRET", projectEnvironment: "YOUR_PROJECT_ENVIRONMENT", projectId: "YOUR_PROJECT_ID"});await client.accounts.retrieve("account_id");
You can also manage this token refresh process yourself, using the /oauth/token API endpoint: