Exchange White Label Oauth2 Code
Exchange OAuth2 code for tokens and create connection with source connection.
Args:
request: The HTTP request response: The HTTP response white_label_id: The ID of the white label to exchange the code for code: The OAuth2 code source_connection_in: Optional source connection configuration db: The database session auth_context: The authentication context background_tasks: Background tasks for async operations
Returns:
source_connection (schemas.SourceConnection): The created source connection
Path parameters
white_label_id
Headers
X-API-Key
X-Organization-ID
Request
This endpoint expects an object.
code
source_connection_in
Schema for creating a source connection.
Contains all fields that are required to create a source connection.
- Sync specific fields are included here.
Response
Successful Response
name
Name of the source connection
short_name
id
organization_id
created_at
modified_at
collection
description
config_fields
Config values model.
Implements "flat dictionary" semantics, where no values are dictionaries.
white_label_id
sync_id
connection_id
created_by_email
modified_by_email
auth_fields
status
Source connection status enum.
Allowed values:
latest_sync_job_status
Sync job status enum.
latest_sync_job_id
latest_sync_job_started_at
latest_sync_job_completed_at
latest_sync_job_error
cron_schedule
next_scheduled_run