Skip to main content
Dify supports connections to various external data sources. To ensure data security and access control, different data sources require appropriate authorization configurations. Dify provides two main authorization methods: API Key and OAuth.

Accessing Data Source Authorization

In Dify, you can access data source authorization through the following two methods:

I. Knowledge Pipeline Orchestration

When orchestrating a knowledge pipeline, select the data source node that requires authorization. Click Connect on the right panel. Knowledge Pipeline Authorization

II. Settings

Click your avatar in the upper right corner and select Settings. Navigate to Data Sources and find the data source you wish to authorize. Settings Authorization

Supported Data Source Authorization

Data SourceAPI KeyOAuth
Notion
Jina Reader
Firecrawl
Google Drive
Dropbox
OneDrive

Authorization Processes

API Key Authorization

API Key authorization is a key-based authentication method suitable for enterprise-level services and developer tools. You need to generate API Keys from the corresponding service providers and configure them in Dify.

Process

  1. On the Data Source page, navigate to the corresponding data source. Click Configure and then Add API Key. Add API Key
  2. In the pop-up window, fill in the Authorization Name and API Key. Click Save to complete the setup. API Key Configuration
The API key will be securely encrypted. Once completed, you can start using the data source (e.g., Jina Reader) for knowledge pipeline orchestration. API Key Complete

OAuth Authorization

OAuth is an open standard authorization protocol that allows users to authorize third-party applications to access their resources on specific service providers without exposing passwords.

Process

  1. On the Data Source page, select an OAuth-supported data source. Click Configure and then Add OAuth. Add OAuth
  2. Review the permission scope and click Allow Access.
OAuth Permissions
OAuth Allow

OAuth Client Settings

Dify provides two OAuth client configuration methods: Default and Custom. OAuth Client Settings
  • Default
  • Custom
The default client is primarily supported in the SaaS version, using OAuth client parameters that are pre-configured and maintained by Dify. Users can add OAuth credentials with one click without additional configuration.
Process for Custom OAuth
  1. On the Data Source page, select an OAuth-supported data source. Click Configure and then the Setting icon on the right side of Add OAuth. Custom OAuth Settings
  2. Choose Custom, enter the Client ID and Client Secret. Click Save and Authorize to complete the authorization. Custom OAuth Configuration