Skip to content

Commit 1e2ef10

Browse files
Adding info re: OAuth clients to Connect docs
1 parent 0a12942 commit 1e2ef10

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

docs-v2/pages/connect/_meta.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
"environments": {
1818
"title": "Environments"
1919
},
20+
"oauth-clients": {
21+
"title": "OAuth Clients"
22+
},
2023
"webhooks": {
2124
"title": "Webhooks"
2225
},
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import Image from 'next/image'
2+
3+
# OAuth Clients
4+
5+
When connecting an account for any OAuth app via Pipedream Connect, we'll default to using Pipedream's official OAuth client, which enables you to quick get up and running. [Read more about OAuth clients in Pipedream here](/connected-accounts/oauth-clients).
6+
7+
## Using a custom OAuth client
8+
1. Follow the steps outlined [here](/connected-accounts/oauth-clients#configuring-custom-oauth-clients) to create an OAuth client in Pipedream.
9+
2. Open the **Apps** tab within your Pipedream project and select **Add app**.
10+
3. Select the app you're looking for, then select the OAuth client from the dropdown menu
11+
4. When connecting an account either via the [frontend SDK](/connect/quickstart#use-the-pipedream-sdk-in-your-frontend) or using [Connect Link](/connect/quickstart#use-connect-link), make sure to include the `oauth_app_id` in the request.
12+
13+
## Finding your OAuth app ID
14+
[Create your OAuth client in Pipedream](https://pipedream.com/@/accounts/oauth-clients) then click the arrow to the left of the client name to expand the details.
15+
16+
<Image src="https://res.cloudinary.com/pipedreamin/image/upload/v1730241292/oauth-app-id_umhhqi.png" alt="Copy OAuth App ID" width={650} height={529} />
17+
18+
## Using Pipedream OAuth clients

docs-v2/pages/connect/quickstart.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ export default function Home() {
139139
const pd = createClient()
140140
function connectAccount() {
141141
pd.connectAccount({
142-
app: process.env.NEXT_PUBLIC_PIPEDREAM_APP_SLUG, // From the Next.js example — adjust to pass your own app name slug
142+
app: appSlug, // Pass the app name slug of the app you want to integrate
143+
oauthAppId: appId, // For OAuth apps, pass the OAuth app ID; omit this param to use Pipedream's OAuth client or for key-based apps
143144
token: "YOUR_TOKEN", // The token you received from your server above
144145
onSuccess: ({ id: accountId }) => {
145146
console.log(`Account successfully connected: ${accountId}`)
@@ -168,7 +169,7 @@ The Connect Link opens a Pipedream-hosted page, guiding users through the accoun
168169
3. Before returning the URL to your user, add an `app` parameter to the end of the query string:
169170

170171
```
171-
https://pipedream.com/_static/connect.html?token={token}&connectLink=true&app={appSlug}
172+
https://pipedream.com/_static/connect.html?token={token}&connectLink=true&app={appSlug}&oauthAppId={oauthAppId}
172173
```
173174

174175
4. Redirect your users to this URL, or send it to them via email, SMS, and more.

0 commit comments

Comments
 (0)