Pipedream ConnectConnect tokens

Connect tokens

When you initiate account connection for your end users, you must either:

  1. Generate a secure, short-lived token scoped to the end user, or
  2. Use the Connect Link feature to generate a URL that guides the user through the account connection flow without any frontend work on your side.

Here, we’ll show you how to generate tokens for your users and return that to your frontend, passing that to the account connection flow.

Use tokens when you want to handle the account connection flow yourself, in your app’s UI. For example, you might want to show a Connect Slack button in your app that triggers the account connection flow for Slack, or launch the flow in a modal.

Connect tokens currently have a 4-hour expiry, and can only be used once.

Creating a token

See docs on the /tokens endpoint to create new tokens.

Webhooks

When you generate a token, you can specify a webhook_uri where Pipedream will deliver updates on the account connection flow. This is useful if you want to update your UI based on the status of the account connection flow, get a log of errors, and more.

See the webhooks docs for more information.

Tokens are scoped to end users and project environments

When you create a new Connect token, you pass an external_user_id and an environment. See the docs on environments for more information on passing environment in the SDK and API.

Tokens are scoped to this user and environment. When the user successfully connects an account with that token, it will be saved for that external_user_id in the specified environment.