You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-v2/pages/connect/index.mdx
+4-10Lines changed: 4 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,7 @@ import VideoPlayer from "@/components/VideoPlayer";
8
8
<Callouttype="info">
9
9
**Pipedream Connect is currently in preview, and we're looking for feedback!**
10
10
11
-
In the preview phase,
12
-
13
-
-**Connect is free to use for any workspace**. [Pricing will come later](#plans-and-pricing), likely at a per-user or per-account charge.
14
-
-**The API will change without notice, which may cause breaking changes**. We'll do our best to communicate these changes.
11
+
**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.
15
12
16
13
Please reach out at `[email protected]` or our [Slack community](https://pipedream.com/support) to let us know how you're using it, what's not working, and what else you'd like to see.
17
14
</Callout>
@@ -27,7 +24,7 @@ Connect lets your users authorize access to any API, directly in your app. You c
27
24
28
25
You have full, code-level control over how these integrations work. You handle the product, Pipedream takes care of the auth. Connect provides:
29
26
30
-
1. A [Client SDK](https://github.com/PipedreamHQ/pipedream/tree/master/packages/sdk) to initiate authorization or accept API keys on behalf of your users, for any of the [{process.env.PUBLIC_APPS}+ APIs](https://pipedream.com/apps) available on Pipedream
27
+
1. A [Client SDK](https://github.com/PipedreamHQ/pipedream/tree/master/packages/sdk)or [Connect Link](/connect/quickstart#use-connect-link)to initiate authorization or accept API keys on behalf of your users, for any of the [{process.env.PUBLIC_APPS}+ APIs](https://pipedream.com/apps) available on Pipedream
31
28
2. A [REST API](/connect/api) to retrieve credentials for your end users — OAuth access tokens, API keys, and other credentials stored for them
32
29
3. The Pipedream platform and its [workflow builder](/workflows), [serverless runtime](/), and thousands of no-code [triggers](/workflows/triggers) and [actions](/workflows/actions)
During the preview phase, **Connect is free to use for any workspace**.
56
53
57
-
After the preview phase, Pipedream is likely to charge on the number of end users who have active accounts in your workspace's projects. Any pricing changes will be clearly communicated, and you can delete unused end user accounts at any time.
58
-
59
54
Please let us know if you have any feedback on the value of Connect and how you'd like to see it priced.
60
55
61
56
## Security
@@ -76,9 +71,8 @@ All credentials and tokens are sent to Pipedream securely over HTTPS, and encryp
76
71
## Product roadmap for Connect
77
72
78
73
- Address bugs and feedback during the preview phase
79
-
- Simplify the developer experience and SDK integration
80
-
- Invoke Pipedream workflows on behalf of end users
81
-
- Support hosted UIs for connecting accounts — native support for mobile environments that can't execute JavaScript or load iframes.
74
+
- Use Pipedream OAuth clients while in development, to make it easier to get started
75
+
- Invoke Pipedream workflows on behalf of your end users
82
76
- Improve error handling for Connect developers and end users
Copy file name to clipboardExpand all lines: docs-v2/pages/connect/quickstart.mdx
+32-28Lines changed: 32 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ You'll need these when configuring the SDK and making API requests.
59
59
You'll need to do two things to integrate Pipedream Connect into your app:
60
60
61
61
1.[Connect to the Pipedream API from your server](#connect-to-the-pipedream-api-from-your-server-and-create-a-token). This lets you make secure calls to the Pipedream API to initiate the account connection flow and retrieve account credentials. If you're running a JavaScript framework like Node.js on the server, you can use the Pipedream SDK.
62
-
2.[Add the Pipedream SDK to your frontend](#connect-your-account-from-the-frontend). This lets you start the account connection flow for your end users.
62
+
2.[Add the Pipedream SDK to your frontend](#connect-your-account-from-the-frontend) or deliver a URL to your users to start the account connection flow.
63
63
64
64
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`.
65
65
@@ -86,8 +86,8 @@ If you're building your own app, you'll need to provide these values to the envi
86
86
87
87
You need to secure specific operations, for example:
88
88
89
-
- You need to initiate the account connection flow for your end users. In Pipedream Connect, **you exchange your project keys for a short-lived token that allows a specific user to connect a specific app**, and return that token to your frontend.
90
-
- If you expose your Pipedream project keys directly to the frontend, anyone could initiate the account connection flow for any user, and you'd be charged for those accounts.
89
+
- You need to initiate the account connection flow for your end users. In Pipedream Connect, **you exchange your project keys for a short-lived token that allows a specific user to connect a specific app**, and return either that token or the `connect_link_url` to your frontend.
90
+
- If you expose your Pipedream project keys directly to the frontend, anyone could initiate the account connection flow for any user.
91
91
- You need to retrieve account credentials for your end users. Again, this should happen securely on your server, not in the frontend, to protect your users' data.
92
92
93
93
</Callout>
@@ -165,8 +165,6 @@ const client = new Client({
165
165
});
166
166
167
167
constconnectTokenOpts= {
168
-
app_slug:"YOUR_APP_SLUG", // The app's name slug
169
-
oauth_app_id:"o_abc123", // The OAuth app ID, if you're connecting an OAuth app — keep this in config / a DB, pass here
170
168
external_id:"USER_ID"// The end user's ID in your system
app_slug: appSlug, // The app's name slug, passed from the frontend
538
-
oauth_app_id: oauthAppId, // The OAuth app ID, if you're connecting an OAuth app — keep this in config / a DB, pass here
539
525
external_id: externalUserId// The end user's ID in your system
540
526
});
541
527
```
542
528
543
529
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. For example, you might validate a user's session, then call the Pipedream API to create a new token for that user.
544
530
545
-
### Connect your account from the frontend
531
+
### Connect your account
546
532
533
+
To actually connect an account, you have two options:
534
+
1.[Use the Pipedream SDK](#use-the-pipedream-sdk-in-your-frontend) in your frontend
535
+
2.[Use Connect Link](#use-connect-link) to deliver a hosted URL to your user
536
+
537
+
#### Use the Pipedream SDK in your frontend
547
538
First, install the [Pipedream SDK](https://www.npmjs.com/package/@pipedream/sdk) in your frontend:
548
539
549
540
```bash
@@ -583,6 +574,19 @@ export default function Home() {
583
574
584
575
Press that button to connect an account for the app you configured.
585
576
577
+
#### Use Connect Link
578
+
- Avoid any frontend implementation
579
+
- If you aren't able to execute JavaScript or open an iFrame in your frontend, you can use the `connect_link_url` that's returned from the `connectTokenCreate` method to deliver a URL to your users.
580
+
- Before returning the URL to your user, you'll need to include the `app` on the URL. For example, see below.
581
+
- Users can open this URL in a browser window to connect their account.
0 commit comments