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_idstringRequired

Headers

X-API-KeystringOptional
X-Organization-IDstringOptional

Request

This endpoint expects an object.
codestringRequired
source_connection_inobjectOptional

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
namestring>=4 characters<=42 characters
Name of the source connection
short_namestring
idstringformat: "uuid"
organization_idstringformat: "uuid"
created_atdatetime
modified_atdatetime
collectionstring
descriptionstring or null
config_fieldsmap from strings to any or null
Config values model. Implements "flat dictionary" semantics, where no values are dictionaries.
white_label_idstring or nullformat: "uuid"
sync_idstring or nullformat: "uuid"
connection_idstring or nullformat: "uuid"
created_by_emailstring or nullformat: "email"
modified_by_emailstring or nullformat: "email"
auth_fieldsmap from strings to any or string or null
statusenum or null
Source connection status enum.
Allowed values:
latest_sync_job_statusenum or null
Sync job status enum.
latest_sync_job_idstring or nullformat: "uuid"
latest_sync_job_started_atdatetime or null
latest_sync_job_completed_atdatetime or null
latest_sync_job_errorstring or null
cron_schedulestring or null
next_scheduled_rundatetime or null

Errors