Back to Documentation
Documentation / Integrations / OAuth 2.0

OAuth 2.0 Setup

Secure authentication for third-party applications

OAuth 2.0 Protocol

Industry-standard authorization framework for secure API access

Creating OAuth App

  1. Go to Settings → Developers → OAuth Apps
  2. Click + Create OAuth App
  3. Enter app name and description
  4. Add redirect URIs (callback URLs)
  5. Select required scopes
  6. Save and receive Client ID and Client Secret

Authorization Flow

# Step 1: Redirect user to authorization URL
https://auth.cognexiaai.com/oauth/authorize?
  client_id=YOUR_CLIENT_ID&
  redirect_uri=https://yourapp.com/callback&
  response_type=code&
  scope=crm:read crm:write

# Step 2: Exchange code for access token
POST https://auth.cognexiaai.com/oauth/token
Content-Type: application/json

{
  "grant_type": "authorization_code",
  "code": "AUTH_CODE",
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "redirect_uri": "https://yourapp.com/callback"
}

Next Steps