Integrations
OAuth and Credentials
OAuth flow, encrypted credential storage, and default-connection behavior.
OAuth and Credentials
OAuth Endpoints
GET /api/oauth/{integration_name}/authorizeGET /api/oauth/callback
Flow summary:
- Frontend requests authorize URL.
- Backend creates PKCE + state and stores state in ephemeral KV.
- User authorizes in popup.
- Callback exchanges code for tokens.
- Tokens are encrypted and stored.
Credential Routes
POST /api/agents/{agent_id}/credentialsGET /api/agents/{agent_id}/credentialsPUT /api/agents/{agent_id}/credentials/{credential_id}DELETE /api/agents/{agent_id}/credentials/{credential_id}
Secrets are encrypted at rest and never returned as plaintext in API responses.
Default Connection Model
The integrations API supports platform-level default connections plus agent-specific overrides.
GET /api/integrations/default-connectionsGET /api/integrations/{integration_name}/default-connectionPUT /api/integrations/{integration_name}/default-connectionDELETE /api/integrations/{integration_name}/default-connection