Skip to content

Commit cd7ce90

Browse files
Updating Connect Link quickstart
1 parent f3bac44 commit cd7ce90

File tree

2 files changed

+30
-39
lines changed

2 files changed

+30
-39
lines changed

docs-v2/pages/connect/index.mdx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import VideoPlayer from "@/components/VideoPlayer";
66
# Pipedream Connect
77

88
<Callout type="info">
9-
**Pipedream Connect is currently in preview, and we're looking for design partners to pair with us on the product roadmap and provide feedback**. If you're building apps, AI agents, or anything else that needs to integrate with many third-party APIs, please reach out at `[email protected]` or our [Slack community](https://pipedream.com/support)
9+
**Pipedream Connect is currently in preview, and we're looking for design partners to pair with us on the product roadmap and provide feedback**. If you're building apps, AI agents, or anything else that needs to integrate with many third-party APIs, please reach out at `[email protected]` or in our [Slack community](https://pipedream.com/support).
1010

1111
During the preview phase, Connect is free to use for any workspace. The API may change without notice, which may cause breaking changes. We'll do our best to communicate these changes. Please let us know how you're using it, what's not working, and what else you'd like to see.
1212
</Callout>
@@ -20,6 +20,7 @@ Connect lets you:
2020
1. Handle authorization or accept API keys on behalf of your users, for any of Pipedream's [{process.env.PUBLIC_APPS}+ APIs](https://pipedream.com/apps). Use the [Client SDK](https://github.com/PipedreamHQ/pipedream/tree/master/packages/sdk) or [Connect Link](/connect/quickstart#use-connect-link) to accept auth in minutes.
2121
2. Securely retrieve OAuth access tokens, API keys, and other credentials for your end users with Pipedream's [REST API](/connect/api)
2222
3. Run workflows for your end users with Pipedream's [workflow builder](/workflows), [serverless runtime](/), and thousands of no-code [triggers](/workflows/triggers) and [actions](/workflows/actions). Build complex integrations in minutes, writing code when you need it and using no-code components when you don't. Pipedream workflows are easy to modify, debug, and scale.
23+
4. Run [any Pipedream action](https://pipedream.com/explore) or [deploy any Pipedream trigger](https://pipedream.com/explore) on behalf of your users, directly from within your application.
2324

2425
<br />
2526

@@ -61,12 +62,6 @@ All credentials and tokens are sent to Pipedream securely over HTTPS, and encryp
6162
- **Use secure, session-based auth between your client and server** — authorize all requests from your client to your server using a secure, session-based auth mechanism. Use well-known identity providers with services like [Clerk](https://clerk.com/), [Firebase](https://firebase.google.com/), or [Auth0](https://auth0.com/) to securely generate and validate authentication tokens. The same follows for Pipedream workflows — if you trigger Pipedream workflows from your client or server, validate all requests in the workflow before executing workflow code.
6263
- **Secure your workflows** — See our [standard security practices](/privacy-and-security/best-practices) for recommendations on securing your Pipedream workflows.
6364

64-
## Product roadmap for Connect
65-
66-
- Address bugs and feedback during the preview phase
67-
- Invoke Pipedream workflows on behalf of your end users
68-
- And more!
69-
7065
## Glossary of terms
7166

7267
- **App**: GitHub, Notion, Slack, Google Sheets, and more. The app is the API you want your users to connect to in your product. See the [full list here](https://pipedream.com/apps).

docs-v2/pages/connect/quickstart.mdx

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ There are two types of apps in Pipedream:
3535
1. **Key-based**: These apps require static credentials, like API keys. Pipedream stores these credentials securely and exposes them via API.
3636
2. **OAuth**: These apps require OAuth authorization. Pipedream manages the OAuth flow for these apps, ensuring you always have a fresh access token for requests.
3737

38-
**OAuth apps require you [create your own OAuth client](#creating-a-custom-oauth-client):**
38+
**OAuth apps require you create your own OAuth client to [deploy to production](/connect/environments):**
39+
40+
<Callout type="info">
41+
To get started in [development mode](/connect/environments), you can skip these steps. To deploy your app to production, you'll need to create an OAuth client for the app you're integrating.
42+
</Callout>
3943

4044
1. First, [create an OAuth client](/connected-accounts/oauth-clients#configuring-custom-oauth-clients) for the app you'd like to integrate.
4145
2. Now when selecting an OAuth app in the **Apps** tab, you'll be prompted to select the OAuth client you've created.
@@ -44,7 +48,7 @@ There are two types of apps in Pipedream:
4448

4549
Pipedream uses OAuth to authorize requests to the REST API. To create an OAuth application:
4650

47-
1. Visit your workspace's [API settings](https://pipedream.com/settings/api).
51+
1. Visit the [API settings](https://pipedream.com/settings/api) for your workspace.
4852
2. Click the **New OAuth App** button.
4953
3. Name your app and click **Create**.
5054
4. Copy the app's client secret. **It will not be accessible again**. Click **Close**.
@@ -61,7 +65,7 @@ You'll need to do two things to add Pipedream Connect to your app:
6165

6266
We'll walk through these steps below, using [an example Next.js app](https://github.com/PipedreamHQ/pipedream-connect-examples/tree/master/next-app/). To follow along, clone [the repo](https://github.com/PipedreamHQ/pipedream-connect-examples/) and follow the instructions in [the app's `README`](https://github.com/PipedreamHQ/pipedream-connect-examples/tree/master/next-app/). That will run the app on `localhost:3000`.
6367

64-
<Callout>
68+
<Callout type="info">
6569
The Next.js app is just an example. You can build Connect apps in any framework, using any language. We've provided examples in Python, Ruby, and others below.
6670
</Callout>
6771

@@ -81,16 +85,9 @@ PIPEDREAM_OAUTH_CLIENT_SECRET=your_client_secret
8185

8286
If you're building your own app, you'll need to provide these values to the environment, or retrieve them from your secrets store.
8387

84-
### Generate a token or Connect Link URL for your end users
85-
86-
To securely initiate account connections for your users, you'll need to either:
87-
88-
1. [Generate a short-lived token](#generate-a-token) for your users and return that to your frontend, passing that to the account connection flow. Use this method when you want to handle the account connection flow yourself, in your app. For example, you might want to show a **Connect Slack** button in your app that triggers the account connection flow.
89-
2. Redirect your users to [a Pipedream-hosted URL](#use-connect-link), which handles the account connection flow for you. Use this option when you can't execute JavaScript in your environment (e.g. mobile apps), or when you want to offload the account connection flow to Pipedream. You can also send these links in email or SMS.
90-
91-
#### Generate a token
88+
### Generate a short-lived token
9289

93-
See [the docs on Connect tokens](/connect/tokens) for a general overview of why we need to create tokens and scope them to end users.
90+
To securely initiate account connections for your users, you'll need generate a short-lived token for your users and use that in the [account connection flow](#connect-a-users-account). See [the docs on Connect tokens](/connect/tokens) for a general overview of why we need to create tokens and scope them to end users.
9491

9592
In the Next.js example here, we're running [Next server components](https://nextjs.org/docs/app/building-your-application/rendering/server-components) in `app/server.ts`. We call the `serverConnectTokenCreate` method from the frontend to retrieve a token **for a specific user**.
9693

@@ -104,26 +101,7 @@ const { token, expires_at } = await serverConnectTokenCreate({
104101

105102
If you're using a different server / API framework, you'll need to make secure calls to that API to create a new token for your users.
106103

107-
Once you have a token, return it to your frontend to start the account connection flow for the user, or redirect them to a Pipedream-hosted URL with [Connect Link](#using-connect-link).
108-
109-
#### Use Connect Link
110-
111-
Connect Link lets you connect third-party accounts without any frontend implementation in your app.
112-
113-
If you aren't able to execute JavaScript or open an iFrame in your frontend, or you want to send users a URL to connect accounts via email or SMS, use Connect Link. That URL opens a Pipedream-hosted page that guides the user through the account connection flow. The URL is scoped to the specific end user, and expires after 4 hours.
114-
115-
1. First, [generate a token](#generate-a-token) for your users.
116-
2. Extract the `connect_link_url` from the token response.
117-
3. Before returning the URL to your user, add an `app` parameter to the end of the query string:
118-
119-
```
120-
https://pipedream.com/_static/connect.html?token={token}&connectLink=true&app={appSlug}
121-
```
122-
123-
4. Redirect your users to this URL, or send it to them via email, SMS, and more.
124-
125-
**To test this code, check out this workflow:**
126-
[https://pipedream.com/new?h=tch_EvfbvQ](https://pipedream.com/new?h=tch_EvfbvQ)
104+
Once you have a token, return it to your frontend to start the account connection flow for the user, or redirect them to a Pipedream-hosted URL with [Connect Link](#use-connect-link).
127105

128106
### Connect a user's account
129107

@@ -134,6 +112,8 @@ To connect a third-party account for a user, you have two options:
134112

135113
#### Use the Pipedream SDK in your frontend
136114

115+
Use this method when you want to handle the account connection flow yourself, in your app. For example, you might want to show a **Connect Slack** button in your app that triggers the account connection flow.
116+
137117
First, install the [Pipedream SDK](https://www.npmjs.com/package/@pipedream/sdk) in your frontend:
138118

139119
```bash
@@ -173,6 +153,22 @@ export default function Home() {
173153

174154
Press that button to connect an account for the app you configured.
175155

156+
#### Use Connect Link
157+
158+
Use this option when you can't execute JavaScript or open an iFrame in your environment (e.g. mobile apps), or when you want to offload the account connection flow to Pipedream and avoid frontend work. You can also send these links via email or SMS.
159+
160+
The Connect Link opens a Pipedream-hosted page, guiding users through the account connection process. The URL is specific to the user and expires after 4 hours.
161+
162+
1. First, [generate a token](#generate-a-token) for your users.
163+
2. Extract the `connect_link_url` from the token response.
164+
3. Before returning the URL to your user, add an `app` parameter to the end of the query string:
165+
166+
```
167+
https://pipedream.com/_static/connect.html?token={token}&connectLink=true&app={appSlug}
168+
```
169+
170+
4. Redirect your users to this URL, or send it to them via email, SMS, and more.
171+
176172
### Retrieve the credentials from the backend
177173

178174
Once your user connects an account, you can retrieve their credentials from your backend.

0 commit comments

Comments
 (0)