public_sources
public
Sources

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' | 'facebook-pages' | 'gcs' | 'github' | 'gitlab' | 'google-ads' | 'google-analytics-data-api' | 'google-drive' | 'google-search-console' | 'google-sheets' | 'hubspot' | 'instagram' | 'intercom' | 'lever-hiring' | 'linkedin-ads' | 'mailchimp' | 'microsoft-onedrive' | 'microsoft-sharepoint' | 'microsoft-teams' | 'monday' | 'notion' | 'pinterest' | 'rd-station-marketing' | 'salesforce' | 'sharepoint-enterprise' | 'slack' | 'smartsheets' | 'snapchat-marketing' | 'surveymonkey' | 'ticktick' | 'tiktok-marketing' | 'trello' | 'typeform' | 'youtube-analytics' | 'zendesk-support' | 'zendesk-talk' required
requestedScopesstring[]

Optional OAuth scopes to request, overriding the connector's default scopes. Only supported for connectors that define scopes as an array.

requestedOptionalScopesstring[]

Optional OAuth optional_scopes to request, overriding the connector's default optional_scopes. Only applied when requestedScopes is also provided.

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.

Changes

Changed in 10 of the 31 revisions of this API.710

    • added the new optional request property requestedOptionalScopes

      new-optional-request-property

    • added the new optional request property requestedScopes

      new-optional-request-property

    • added the new ticktick enum value to the request property sourceType

      request-property-enum-value-added

  • 0701e88bdf3111See the full diff
    • removed the enum value snowflake of the request property sourceType

      request-property-enum-value-removed

    • added the new intercom enum value to the request property sourceType

      request-property-enum-value-added

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new facebook-pages enum value to the request property sourceType

      request-property-enum-value-added

    • added the new sharepoint-enterprise enum value to the request property sourceType

      request-property-enum-value-added

    • removed the enum value zendesk-chat of the request property sourceType

      request-property-enum-value-removed

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • removed the enum value intercom of the request property sourceType

      request-property-enum-value-removed

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • removed the enum value retently of the request property sourceType

      request-property-enum-value-removed

    • removed the enum value zendesk-sunshine of the request property sourceType

      request-property-enum-value-removed

    • added the new snapchat-marketing enum value to the request property sourceType

      request-property-enum-value-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new gcs enum value to the request property sourceType

      request-property-enum-value-added

  • fae855ef1b7622See the full diff
    • removed the enum value snapchat-marketing of the request property sourceType

      request-property-enum-value-removed

    • removed the enum value square of the request property sourceType

      request-property-enum-value-removed

    • added the new drift enum value to the request property sourceType

      request-property-enum-value-added

    • added the new rd-station-marketing enum value to the request property sourceType

      request-property-enum-value-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog