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
@@ -3,55 +3,70 @@ import { Steps } from 'nextra/components'
3
3
4
4
# Pipedream Connect
5
5
6
+
## Overview
7
+
8
+
Pipedream Connect is the easiest way for your users to connect to any API, **right in your product**.
9
+
10
+
Connect enables you to easily integrate more than {process.env.PUBLIC_APPS}+ APIs directly into your application, letting you make authenticated requests on behalf of your end users, while not having to handle authorization grants or refresh tokens yourself, and it includes these features:
11
+
1.[Client SDK](https://github.com/PipedreamHQ/pipedream/tree/master/packages/sdk) to initiate authorization for any one of the [{process.env.PUBLIC_APPS}+ APIs](https://pipedream.com/apps) available on Pipedream
12
+
2.[REST API](#rest-api-overview) to retrieve credentials (access token, API key, etc.) for your end users
13
+
3. The Pipedream platform, which includes [a serverless runtime](/), [thousands of pre-built source-available triggers and actions](https://github.com/PipedreamHQ/pipedream/tree/master/components), and a first-class developer experience to build, test, and deploy custom workflows
14
+
15
+
6
16
<Callouttype="info">
7
-
Pipedream Connect is currently in **preview** and we're looking for feedback!
17
+
**Pipedream Connect is currently in preview and we're looking for feedback!**
8
18
9
19
**While in the preview phase, the API may change without notice. We'll do our best to communicate any changes, but please be aware that breaking changes may occur.**
10
20
11
-
Please [let us know](https://pipedream.com/support) how you're using it, what's not working, and what else you'd like to see!
21
+
Please [let us know](mailto:connect@pipedream.com) how you're using it, what's not working, and what else you'd like to see!
12
22
</Callout>
13
23
14
-
## Overview
15
-
16
-
Connect enables you to easily integrate more than {process.env.PUBLIC_APPS}+ APIs directly into your application, letting you make authenticated requests on behalf of your end users, while not having handle authorization grants or refresh tokens yourself, and it includes these features:
17
-
1.[Client SDK](https://github.com/PipedreamHQ/pipedream/tree/master/packages/sdk) to initiate authorization for any one of the [{process.env.PUBLIC_APPS}+ APIs](https://pipedream.com/apps) available on Pipedream
18
-
2.[REST API](/connected-accounts/api) to retrieve credentials (access token, API key, etc.) for your end users
19
-
3. The rest of Pipedream, which includes [a serverless runtime platform](/), [thousands of pre-built source-available triggers and actions](https://github.com/PipedreamHQ/pipedream/tree/master/components), and a first-class developer experience to build, test, and deploy custom workflows
20
-
21
24
## Getting started
22
25
23
26
<Steps>
24
27
25
28
### Enable the feature flag
26
-
Enable the feature flag for **Connect** in your Pipedream account: [https://pipedream.com/settings/alpha](https://pipedream.com/settings/alpha)
29
+
-Enable the feature flag for **Pipedream Connect** in your [accountsettings here](https://pipedream.com/settings/alpha).
27
30
28
31
<Callouttype="info">
29
-
Please reach out to our team at [[email protected]]([email protected]) to enable your account for Connect, once you've enabled the feature flag.
32
+
Please reach out to our team at [[email protected]](mailto:[email protected]) to activate your account for Connect once you've enabled the feature flag and send us your [workspace ID](https://pipedream.com/settings/account).
30
33
</Callout>
31
34
32
35
### Verify your application's domain
33
-
To integrate the Pipedream SDK on your site, you'll need to verify ownership of your web domain. [Check out the docs](workspaces/domain-verification#pipedream-connect) to get started.
36
+
-To integrate the Pipedream SDK on your site, you'll need to verify ownership of your web domain. [Check out the docs](workspaces/domain-verification#pipedream-connect) to get started.
34
37
35
38
### Configure an OAuth client in Pipedream
36
-
To use Pipedream Connect, you'll need to create an OAuth client in Pipedream, for whatever app you want to integrate. [Check out the docs](/connected-accounts/oauth-clients#configuring-custom-oauth-clients) to get started.
39
+
- To use Pipedream Connect, you'll need to create an OAuth client in Pipedream for whatever app you want to integrate. [Check out the docs](/connected-accounts/oauth-clients#configuring-custom-oauth-clients) to get started.
40
+
- Make sure to check the box to **Allow external user connections** in the OAuth client configuration in Pipedream
37
41
38
42
### Open your Pipedream project
39
-
Open an existing Pipedream project or create a new one: [https://pipedream.com/projects](https://pipedream.com/projects)
40
-
- Note your **Project Public Key** and **Project Secret Key** from the **Connect** tab within your project, you'll need these when configuring the SDK and making API requests
43
+
-Open an existing Pipedream project or create a new one: [https://pipedream.com/projects](https://pipedream.com/projects)
44
+
- Note your **Project Public Key** and **Project Secret Key** from the **Connect** tab within your project — you'll need these when configuring the SDK and making API requests
41
45
42
46
### Run the example app
43
-
The code for the Pipedream SDK can be found in our [public `pipedream` repo](https://github.com/PipedreamHQ/pipedream), in `/packages/sdk`. Check out the `README` there to get started.
47
+
- Install the [SDK](https://www.npmjs.com/package/@pipedream/sdk) via npm: `npm install @pipedream/sdk`
48
+
- The code for the Pipedream SDK lives in the [public pipedream repo](https://github.com/PipedreamHQ/pipedream/tree/master/packages/sdk)
49
+
- Check out the example app and README there to get started
44
50
45
51
### Retrieve your user credentials from Pipedream's API
46
-
Check out to the API reference below to retrieve your users' credentials from Pipedream's API after they've connected their account.
52
+
-Check out to the API reference below to retrieve your users' credentials from Pipedream's API after they've connected their account.
47
53
48
54
</Steps>
49
55
50
56
## Retrieving account details and user credentials
51
57
After your end users have connected their account using Pipedream Connect, you can retrieve their credentials using Pipedream's REST API, which enables you to make authenticated requests on their behalf.
52
58
53
59
### REST API Overview
54
-
The base URL for all Connect requests is `https://api.pipedream.com/v1/connect`.
60
+
<Callouttype="warning">
61
+
Note that both the Base URL and authentication method for the Connect REST API are different from the rest of Pipedream's REST API.
62
+
</Callout>
63
+
64
+
**Base URL for all Connect requests**
65
+
```
66
+
https://api.pipedream.com/v1/connect
67
+
```
68
+
69
+
**Authentication**
55
70
56
71
You authenticate to the Connect REST API using **Basic Auth**. Send your Pipedream [Project Public Key]() as the username and the [Project Secret Key]() as the password. When you make API requests, pass an
List all connected accounts for end users within your project
87
+
#### List all accounts
88
+
List all connected accounts for all end users within your project
89
+
90
+
<Callouttype="warning">
91
+
This endpoint is not currently paginated, so we'll attempt to return all connected accounts for all users within your project. We intend to add pagination soon.
92
+
</Callout>
74
93
75
94
```
76
95
GET /accounts/
@@ -85,6 +104,7 @@ GET /accounts/
85
104
{
86
105
"id": "apn_XehyZPr",
87
106
"name": null,
107
+
"external_id": "user-abc-123",
88
108
"healthy": true,
89
109
"dead": false,
90
110
"app": {
@@ -97,6 +117,8 @@ GET /accounts/
97
117
{
98
118
"id": "apn_b6h9QDK",
99
119
"name": null,
120
+
"external_id": "user-abc-123",
121
+
"external_id": "user-abc-123",
100
122
"healthy": true,
101
123
"dead": false,
102
124
"app": {
@@ -109,6 +131,7 @@ GET /accounts/
109
131
{
110
132
"id": "apn_0WhJYxv",
111
133
"name": null,
134
+
"external_id": "user-abc-123",
112
135
"healthy": true,
113
136
"dead": false,
114
137
"app": {
@@ -121,6 +144,7 @@ GET /accounts/
121
144
{
122
145
"id": "apn_kVh9PJx",
123
146
"name": null,
147
+
"external_id": "user-abc-123",
124
148
"healthy": true,
125
149
"dead": false,
126
150
"app": {
@@ -133,6 +157,7 @@ GET /accounts/
133
157
{
134
158
"id": "apn_WYhMlrz",
135
159
"name": null,
160
+
"external_id": "user-abc-123",
136
161
"healthy": true,
137
162
"dead": false,
138
163
"app": {
@@ -162,6 +187,7 @@ GET /apps/:app_id/accounts
162
187
{
163
188
"id": "apn_WYhMlrz",
164
189
"name": null,
190
+
"external_id": "user-abc-123",
165
191
"healthy": true,
166
192
"dead": false,
167
193
"app": {
@@ -180,8 +206,9 @@ GET /apps/:app_id/accounts
180
206
]
181
207
```
182
208
183
-
#### Retrieve account details
184
-
Retrieve the account details for a specific account
209
+
#### Retrieve account details for a specific auth provision
210
+
211
+
Retrieve the account details for a specific account based on the auth provision
185
212
186
213
```
187
214
GET /accounts/:apn_id
@@ -196,6 +223,7 @@ GET /accounts/:apn_id
196
223
"data": {
197
224
"id": "apn_WYhMlrz",
198
225
"name": null,
226
+
"external_id": "user-abc-123",
199
227
"healthy": true,
200
228
"dead": false,
201
229
"app": {
@@ -221,6 +249,7 @@ GET /accounts/:apn_id
221
249
"data": {
222
250
"id": "apn_WYhMlrz",
223
251
"name": null,
252
+
"external_id": "user-abc-123",
224
253
"healthy": true,
225
254
"dead": false,
226
255
"app": {
@@ -245,25 +274,165 @@ GET /accounts/:apn_id
245
274
}
246
275
```
247
276
277
+
#### Retrieve account details for a specific external user
278
+
279
+
Retrieve the account details for a specific account based on the external user ID
280
+
281
+
```
282
+
GET /users/:external_id/accounts
283
+
```
284
+
-`:external_id` is the end user's ID in the Connect Partner's system
285
+
- Optionally include `?include_credentials=1` as a query-string parameter to include the account credentials in the response
286
+
287
+
##### Example response (without account credentials)
288
+
289
+
```json
290
+
[
291
+
{
292
+
"id": "apn_WYhM5ov",
293
+
"name": null,
294
+
"external_id": "user-abc-123",
295
+
"healthy": true,
296
+
"dead": false,
297
+
"app": {
298
+
"id": "oa_aw4ib2",
299
+
"name_slug": "airtable_oauth",
300
+
"name": "Airtable",
301
+
"auth_type": "oauth",
302
+
"description": "Airtable is a low-code platform to build next-gen apps. Move beyond rigid tools, operationalize your critical data, and reimagine workflows with AI.",
"description": "Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.",
##### Example Response (with `include_credentials=1`)
345
+
346
+
```json
347
+
[
348
+
{
349
+
"id": "apn_WYhM5ov",
350
+
"name": null,
351
+
"external_id": "user-abc-123",
352
+
"healthy": true,
353
+
"dead": false,
354
+
"app": {
355
+
"id": "oa_aw4ib2",
356
+
"name_slug": "airtable_oauth",
357
+
"name": "Airtable",
358
+
"auth_type": "oauth",
359
+
"description": "Airtable is a low-code platform to build next-gen apps. Move beyond rigid tools, operationalize your critical data, and reimagine workflows with AI.",
"description": "Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.",
-**App**: GitHub, Notion, Slack, Google Sheets, etc. — the API you want to make requests to on behalf of your end user. See our full list here: [https://pipedream.com/apps](https://pipedream.com/apps).
275
444
-**Connect Partner**: This is probably you — the Pipedream customer who is developing an application and wants to use Pipedream Connect to make authenticated requests on behalf of their end users.
276
-
-**Connected Account**: Read more about connected accounts [here](/connected-accounts) — this is the account connection for your end user.
277
-
-**End User**: The customer of the Connect Partner and whose data you want to access on their behalf.
445
+
-**Connected Account**: Read more about connected accounts [here](/connected-accounts) — this is the account connection for your end user, and is also referred to as **auth provision**.
446
+
-**End User**: The customer of the Connect Partner and whose data you want to access on their behalf (`external_id` in the API).
447
+
-**OAuth Client**: The OAuth client you create in Pipedream to connect to an app. Read more about OAuth clients [here](/connected-accounts/oauth-clients).
448
+
449
+
## Known limitations
450
+
- The only apps that work with Pipedream Connect today are apps that use OAuth 2.0 to authenticate, and that do not require any user-input fields during the OAuth flow. We're working on extending support to all integrated apps on Pipedream.
451
+
- There is very limited error handling today, but this is top of mind for us and is on the near-term roadmap. If you or your end users encounter any issues, please reach out to us at [[email protected]](mailto:[email protected])
0 commit comments