Connect tokens
When you initiate account connection for your end users, you must either:
- Generate a secure, short-lived token scoped to the end user, or
- 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.
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 optional project_environment
parameter. By default, the environment is set to production
. Available environments include:
production
(default)development
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 project_environment
.