Skip to main content

Integration API Overview

The Informer Integration API provides endpoints for managing OAuth-based integrations with external services like Google Drive, OneDrive, SharePoint, Dropbox, and custom OAuth providers. Integrations enable secure connections to third-party services with automatic token refresh and account management. All routes are prefixed with /api.

Features

  • CRUD Operations - Create, read, update, and delete integrations
  • OAuth 2.0 Flow - Connect and authorize with external services
  • Token Management - Automatic access token refresh
  • Connection Modes - Per-user or shared connections
  • Auth Types - OAuth2, API key, basic auth, bearer tokens
  • Ownership & Sharing - Team-based ownership with principal-level sharing and access control
  • Custom Headers - Per-integration custom headers with variable expansion (e.g., ${user.email}, ${tenant.id})
  • Directory Previews - Preview available directories before connecting
  • Icon Management - Upload custom integration icons
  • Request Proxying - Proxy authenticated requests through integrations

Integration Types

Integrations support multiple authentication methods:

Auth TypeDescription
oauth2OAuth 2.0 authorization code flow
apikeyAPI key authentication (header or query param)
basicHTTP Basic authentication
bearerBearer token authentication

Connection Modes

Integrations can be configured in two modes:

ModeDescription
per-userEach user maintains their own connection (default)
sharedSingle shared connection for all users (e.g., service accounts)

Authentication

All Integration API endpoints require authentication via session cookies or API tokens. Most endpoints verify integration permissions before allowing access.

Common Permission Patterns

  • Read access - View integration configuration (requires ownership or superuser)
  • Write permission - Required for integration:write (create, update, delete)
  • Delete permission - Required for integration:delete (remove integration)

OAuth 2.0 Flow

The standard OAuth workflow for integrations:

  1. Create integration - POST /api/integrations with OAuth config
  2. Initiate OAuth - GET /api/integrations/{id}/connect redirects to provider
  3. OAuth callback - User authorizes, provider redirects to GET /oauth2/callback
  4. Connection created - Access tokens stored securely, integration is ready

OAuth Configuration

Required fields for OAuth integrations:

FieldDescription
authUriAuthorization endpoint (e.g., https://accounts.google.com/o/oauth2/v2/auth)
tokenUriToken endpoint (e.g., https://oauth2.googleapis.com/token)
clientIdOAuth client ID
clientSecretOAuth client secret (encrypted at rest)
scopeSpace-separated scopes (e.g., https://www.googleapis.com/auth/drive.readonly)
apiBaseUriBase URL for API requests

Error Responses

Standard HTTP status codes:

  • 200 - Success
  • 201 - Created (resource created successfully)
  • 204 - No Content (successful delete)
  • 302 - Redirect (OAuth flow)
  • 400 - Bad request (validation error)
  • 403 - Forbidden (insufficient permissions)
  • 404 - Resource not found
  • 500 - Internal server error

Ownership Model

Integrations use a team-based ownership model:

  • Owner: Each integration has an ownerId that can be a user or team principal
  • Natural ID: Integrations are addressed as ownerId:slug (e.g., admin:google-drive)
  • Sharing: Integrations can be shared with other principals via the sharing API, with configurable access levels
  • Read Access: Non-superusers can only see integrations they own or that have been shared with them

Next Steps

Explore the specific endpoint categories: