From 343772062f80ac78c9a71f0292c973cb03ed69f2 Mon Sep 17 00:00:00 2001 From: Riskey <36894937+RiskeyL@users.noreply.github.com> Date: Tue, 9 Sep 2025 09:53:27 +0800 Subject: [PATCH] Documentation edits made through Mintlify web editor --- .../quick-start/develop-plugins/tool-oauth.mdx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/en/plugins/quick-start/develop-plugins/tool-oauth.mdx b/en/plugins/quick-start/develop-plugins/tool-oauth.mdx index d39f4c44..76135b53 100644 --- a/en/plugins/quick-start/develop-plugins/tool-oauth.mdx +++ b/en/plugins/quick-start/develop-plugins/tool-oauth.mdx @@ -4,7 +4,9 @@ title: "Adding OAuth Support to Your Tool Plugin" ![b0e673ba3e339b31ac36dc3cd004df04787bcaa64bb6d2cac6feb7152b7b515f.png](/images/b0e673ba3e339b31ac36dc3cd004df04787bcaa64bb6d2cac6feb7152b7b515f.png) -This guide teaches you how to build [OAuth](https://oauth.net/2/) support into your tool plugin. OAuth is a better way to authorize tool plugins that need to access user data from third-party services, like Gmail or GitHub. Instead of requiring the user to manually enter API keys, OAuth lets the tool act on behalf of the user with their explicit consent. +This guide teaches you how to build [OAuth](https://oauth.net/2/) support into your tool plugin. + +OAuth is a better way to authorize tool plugins that need to access user data from third-party services, like Gmail or GitHub. Instead of requiring the user to manually enter API keys, OAuth lets the tool act on behalf of the user with their explicit consent. ## Background @@ -27,16 +29,16 @@ Dify instance's admin / developer first need to register an OAuth app at the thi 2. Enable the required APIs (e.g., Gmail API) - 1. Navigate to "APIs & Services" → "OAuth consent screen" - 2. Choose "External" user type for public plugins + 1. Navigate to **APIs & Services** \> **OAuth consent screen** + 2. Choose **External** user type for public plugins 3. Fill in application name, user support email, and developer contact 4. Add authorized domains if needed - 5. For testing: Add test users in the "Test users" section + 5. For testing: Add test users in the **Test users** section - 1. Go to "APIs & Services" → "Credentials" - 2. Click "Create Credentials" → "OAuth 2.0 Client IDs" - 3. Choose "Web application" type + 1. Go to **APIs & Services** \> **Credentials** + 2. Click **Create Credentials** \> **OAuth 2.0 Client IDs** + 3. Choose **Web application** type 4. A`client_id` and a`client_secret` will be generated. Save these as the credentials. @@ -68,7 +70,7 @@ Dify instance's admin / developer first need to register an OAuth app at the thi https://{your-dify-domain}/console/api/oauth/plugin/{plugin-id}/{provider-name}/{tool-name}/callback ``` - For self-hosted Dify, the {your-dify-domain} should be consistent with the `CONSOLE_WEB_URL`. + For self-hosted Dify, the `your-dify-domain` should be consistent with the `CONSOLE_WEB_URL`.