Skip to main content

OAuth2

Handle OAuth2 authentication flows to obtain access tokens for API integrations.

Overview

The OAuth2 package provides OAuth2 authentication capabilities for API integrations. Use it when you need to authenticate with services that require OAuth2, obtain access tokens, and authorize your automation to access protected resources.

Key Features

  • Authorization Code Flow - Complete OAuth2 authorization code grant
  • Token Management - Obtain and use access tokens

Available Nodes

  • Auth Code - Complete OAuth2 authorization code flow to obtain access tokens

When to Use This Package

  • API Authentication: When APIs require OAuth2 tokens
  • Third-Party Integrations: Connect to services like Google, Microsoft, Salesforce
  • User Authorization: When automation needs to act on behalf of a user
  • Secure API Access: Replace API keys with OAuth2 tokens

OAuth2 Flow

  1. Redirect user to authorization URL
  2. User grants permission
  3. Receive authorization code
  4. Exchange code for access token
  5. Use token for API requests

Supported Grant Types

  • Authorization Code - Standard OAuth2 flow for web applications

Typical Workflow

  1. Configure OAuth2 client credentials (client ID, secret)
  2. Auth Code to initiate authorization flow
  3. Receive access token
  4. Use token in HTTP requests to protected APIs

Use Cases

  • Authenticate with Google APIs (Drive, Sheets, Gmail)
  • Connect to Microsoft Graph API
  • Integrate with Salesforce, HubSpot, or other CRMs
  • Access any OAuth2-protected API

Notes

  • Store client secrets securely in vault
  • Tokens may need periodic refresh
  • Scopes define what permissions are granted