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
@@ -305,6 +305,19 @@ The ID of the [OAuth app](/connect/quickstart#create-a-pipedream-oauth-client) y
305
305
306
306
[The external user ID](/connect/api/#external-users) in your system that you want to retrieve accounts for.
307
307
308
+
---
309
+
310
+
`include_credentials`**boolean** (_optional_)
311
+
312
+
Pass `include_credentials=true` as a query-string parameter to include the account credentials in the response.
313
+
314
+
<Callouttype="warning">
315
+
Never return user credentials to the client
316
+
</Callout>
317
+
318
+
<Callouttype="info">
319
+
To retrieve the credentials for any account in `production` for OAuth apps (Slack, Google Sheets, etc), the connected account must be using [your own OAuth client](/connect/oauth-clients#using-a-custom-oauth-client). You can only retrieve end user credentials for accounts that are using Pipedream's OAuth clients in `development`. [Learn more here](/connect/oauth-clients#using-pipedream-oauth).
-d "external_user_id=user-abc-123"\ # optional, filter by external user ID
392
+
-d "include_credentials=true"# optional, include credentials
393
+
394
+
395
+
# Parse and return the data you need. These may contain credentials,
396
+
# which you should never return to the client
365
397
```
366
398
</Tabs.Tab>
367
399
</Tabs>
368
400
369
-
##### Example response
401
+
##### Example response (without credentials)
370
402
371
403
```json
372
404
{
405
+
"page_info": {
406
+
"total_count": 5,
407
+
"count": 5,
408
+
"start_cursor": "YXBuX0JtaEJKSm0",
409
+
"end_cursor": "YXBuX1YxaE1lTE0",
410
+
},
373
411
"data": {
374
412
"accounts": [
375
413
{
@@ -442,6 +480,53 @@ curl -X GET "https://api.pipedream.com/v1/connect/{project_id}/accounts" \
442
480
}
443
481
```
444
482
483
+
##### Example response (with credentials)
484
+
485
+
```json
486
+
{
487
+
"page_info": {
488
+
"total_count": 1,
489
+
"count": 1,
490
+
"start_cursor": "YXBuX0JtaEJKSm0",
491
+
"end_cursor": "YXBuX1YxaE1lTE0",
492
+
},
493
+
"data": {
494
+
"accounts":[
495
+
{
496
+
"id": "apn_MGhvgnX",
497
+
"name": "gcostanza",
498
+
"external_id": "user-abc-123",
499
+
"healthy": true,
500
+
"dead": null,
501
+
"app": {
502
+
"id": "oa_aPXiQd",
503
+
"name_slug": "github",
504
+
"name": "GitHub",
505
+
"auth_type": "oauth",
506
+
"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.",
Retrieve the account details for a specific account based on the account ID
@@ -468,6 +553,10 @@ The ID of the account you want to retrieve
468
553
469
554
Pass `include_credentials=true` as a query-string parameter to include the account credentials in the response.
470
555
556
+
<Callouttype="warning">
557
+
Never return user credentials to the client
558
+
</Callout>
559
+
471
560
<Callouttype="info">
472
561
To retrieve the credentials for any account in `production` for OAuth apps (Slack, Google Sheets, etc), the connected account must be using [your own OAuth client](/connect/oauth-clients#using-a-custom-oauth-client). You can only retrieve end user credentials for accounts that are using Pipedream's OAuth clients in `development`. [Learn more here](/connect/oauth-clients#using-pipedream-oauth).
0 commit comments