v1

latestOpenAPI 3.1.02026-07-2654172281.3 KB

Initiate OAuth for a source

Given a source ID, workspace ID, and redirect URL, initiates OAuth for the source.

This returns a fully formed URL for performing user authentication against the relevant source identity provider (IdP). Once authentication has been completed, the IdP will redirect to an Airbyte endpoint which will save the access and refresh tokens off as a secret and return the secret ID to the redirect URL specified in the secret_id query string parameter.

That secret ID can be used to create a source with credentials in place of actual tokens.

post/sources/initiateOAuth

Request body

redirectUrlstring required

The URL to redirect the user to with the OAuth secret stored in the secret_id query string parameter after authentication is complete.

workspaceIdstring uuid required

The workspace to create the secret and eventually the full source.

{"stackTrail":"components:schemas:OAuthConfiguration","oasType":"schema","type":"unknown","description":"The values required to configure OAuth flows. The schema for this must match the `OAuthConfigSpecification.oauthUserInputFromConnectorConfigSpecification` schema.","extensionFields":{"x-speakeasy-component":true}}
sourceType'airtable' | 'amazon-ads' | 'amazon-seller-partner' | 'asana' | 'azure-blob-storage' | 'bing-ads' | 'drift' | 'facebook-marketing' | 'gcs' | 'github' | 'gitlab' | 'google-ads' | 'google-analytics-data-api' | 'google-drive' | 'google-search-console' | 'google-sheets' | 'hubspot' | 'instagram' | 'lever-hiring' | 'linkedin-ads' | 'mailchimp' | 'microsoft-onedrive' | 'microsoft-sharepoint' | 'microsoft-teams' | 'monday' | 'notion' | 'pinterest' | 'rd-station-marketing' | 'salesforce' | 'slack' | 'smartsheets' | 'snapchat-marketing' | 'snowflake' | 'surveymonkey' | 'tiktok-marketing' | 'trello' | 'typeform' | 'youtube-analytics' | 'zendesk-chat' | 'zendesk-support' | 'zendesk-talk' required

Example request

{
  "redirectUrl": "https://cloud.airbyte.io/v1/api/oauth/callback",
  "workspaceId": "871d9b60-11d1-44cb-8c92-c246d53bf87e",
  "destinationId": "3d93b16c-ff5f-421c-8908-5a3c82088f14"
}

Response

Response from the initiate OAuth call should be an object with a single property which will be the redirect_url. If a user is redirected to this URL, they'll be prompted by the identity provider to authenticate.