Integrations

Complete OAuth connection

Exchanges an OAuth authorization code to complete an integration connection.

Flow:

  1. Call GET /v1/users/:user_id/integrations/connect with provider to get an authUrl
  2. Redirect the user to the authUrl
  3. After user authorizes, they're redirected back with a code
  4. Call this POST endpoint with the code, provider, and state to complete the connection

Supported providers: gmail, slack, outlook, teams

Reconnection: Pass reconnect with an integration ID (int_xxx format) to reconnect an existing integration

post/v1/users/{user_id}/integrations/connect

Request

  • Base URL: http://0.0.0.0:3000
  • URL: http://0.0.0.0:3000/v1/users/{user_id}/integrations/connect
  • Auth: none declared

Path parameters

user_idstring uuid required

Request body

providerstring required

Integration provider (gmail, slack, outlook, teams)

codestring required

OAuth authorization code

statestring

OAuth state parameter returned by the provider. Supports redirect_url in JSON/base64url JSON state.

reconnectstring

Integration ID to reconnect (int_xxx format)

response_mode'json' | 'redirect'

Set to redirect for direct browser POST callbacks. Default json preserves XHR flows.

Response

Default Response

successboolean required
integration_idstring

Created/reconnected integration ID

redirect_urlstring

Partner return URL with OAuth completion query parameters appended, when configured.

Changes

No recorded changes to this operation across all 1 revision of this API.