DevRev supports multiple OAuth2 authentication flows for Salesforce connections, ensuring flexibility and security across different integration scenarios. These authentication methods enable secure, authorized access to Salesforce data while maintaining compliance with enterprise security standards.
Use Case: Server-to-server integrations where no user interaction is required.
Required Credentials:
Client ID
Client Secret
Prerequisites:
Ensure you have appropriate Salesforce admin permissions to create and manage OAuth Apps
Connected App must be configured with proper OAuth settings
The Client Credentials flow is ideal for automated, system-level integrations between DevRev and Salesforce. This flow operates without user intervention.
Key Benefits:
No user login required
Suitable for automated processes
Enhanced security through client authentication
Ideal for production environments with minimal human intervention
Reference: Salesforce Client Credentials OAuth2 Documentation
Use Case: Interactive user authentication with enhanced security through refresh tokens.
Initial Setup Requirements:
Admin Approval Process: When OAuth is first initiated, a Salesforce Admin needs to accept/install the DevRev App in the organization
Organization-Wide Access: Once the DevRev App is installed and approved by an admin, all users within the Salesforce organization can easily make OAuth connections without requiring individual admin approval
One-Time Administrative Action: This initial approval is a one-time process per Salesforce organization
The Authorization Code flow provides the most secure method for user-based Salesforce integrations. This two-part process includes:
Web Server Flow
This flow enables secure user authentication through browser-based OAuth2 authorization, perfect for:
User-specific data access
Interactive applications
Web-based integrations
Applications requiring user consent
Reference: Salesforce Web Server Flow Documentation
Refresh Token Flow
Complementing the web server flow, the refresh token mechanism ensures:
Long-term access without repeated user authentication
Automatic token renewal
Enhanced user experience
Maintained security standards
Reference: Salesforce Refresh Token Flow Documentation
Use Case: Direct authentication using Salesforce credentials for trusted applications.
Required Credentials:
Username
Password
Client ID
Client Secret
Prerequisites:
Ensure you have appropriate Salesforce admin permissions to create and manage OAuth Apps
User account must have API access enabled
Connected App must be properly configured
This flow allows DevRev to authenticate with Salesforce using a username and password combination along with the connected app credentials.
Key Benefits:
Simple implementation
Direct credential authentication
Suitable for trusted environments
Quick setup for development purposes
Reference: Salesforce Username-Password OAuth2 Documentation
To obtain the Client ID and Client Secret required for these OAuth2 flows, you need to create a Connected App in Salesforce:
Access Setup: Log into your Salesforce org and navigate to Setup
Find App Manager: In the Quick Find box, type "App Manager" and select it
Create New Connected App: Click "New Connected App"
Configure Basic Information:
Connected App Name: Enter a name for your app
API Name: This will auto-populate
Contact Email: Enter your email address
Enable OAuth Settings:
Check "Enable OAuth Settings"
Set the Callback URL (required even if not using web server flow)
Select OAuth Scopes needed for your integration
Save and Retrieve Credentials:
After saving, you'll be redirected to the Connected App detail page
Your Consumer Key = Client ID
Click "Click to reveal" next to Consumer Secret = Client Secret
Creating Connected Apps: Create a Connected App
OAuth Settings for Connected Apps: Configure OAuth Settings
Managing Connected Apps: Manage Connected Apps