OAuth Flow Overview
Step 1: Build Authorization URL
Redirect users to the Orbit AI authorization endpoint with the following parameters:| Parameter | Description |
|---|---|
client_id | Your application’s Client ID |
redirect_uri | Must match a registered callback URL |
response_type | Always “code” for authorization code flow |
scope | Space-separated list of requested permissions |
state | Random string for CSRF protection |
Step 2: Exchange Code for Tokens
After the user authorizes your app, they’ll be redirected to your callback URL with an authorization code. Exchange this code for access and refresh tokens:Available Scopes
Request only the permissions your app needs:forms:read
Read form configurations
forms:write
Create and update forms
forms:delete
Delete forms
submissions:read
Read form submissions
submissions:write
Update submission data
contacts:read
Read contacts and tags
contacts:write
Create, update, and manage contacts and tags
contacts:delete
Delete contacts
webhooks:read
Read webhook configurations
webhooks:write
Create and manage webhooks
analytics:read
Read form analytics
Security Best Practices
Keep secrets secure
Never expose your Client Secret in client-side code or version control.
Use state parameter
Always include a random state string to prevent CSRF attacks.
Handle token refresh
Use refresh tokens to get new access tokens before they expire.
Validate redirect URIs
Only use pre-registered callback URLs to prevent open redirect vulnerabilities.