Skip to content
Last updated

Authenticate sources using OAuth flows.

Initiate native OAuth

POSThttps://api.aitronos.com/v1/organizations/{organization_id}/knowledge/connectors/sources/oauth

Start the native OAuth flow for a source that supports it.

Request Body

source_definition_id string required

The source definition ID.

workspace_id string required

The workspace ID.

redirect_url string required

URL to redirect to after OAuth completion.

o_auth_input_configuration object optional

Additional OAuth input configuration.


Initiate connector OAuth

POSThttps://api.aitronos.com/v1/organizations/{organization_id}/knowledge/connectors/sources/authorize

Start an OAuth flow through the Aitronos connector platform.

Request Body

slug string required

The connector app slug (e.g., google-sheets, github).

redirect_url string required

URL to redirect to after OAuth completion.


Complete connector OAuth callback

POSThttps://api.aitronos.com/v1/organizations/{organization_id}/knowledge/connectors/sources/oauth/callback

Complete the connector OAuth flow and create a source with the obtained credentials.

Request Body

connection_id string required

The connection ID from the OAuth initiation.

workspace_id string required

The workspace to create the source in.

source_definition_id string required

The source definition to use.

source_name string required

Display name for the new source.


Returns

For native OAuth: an object with the consent URL. For connector OAuth authorize: authorization_url and connection_id. For callback: the created source object.

cURL
curl -X POST "https://api.aitronos.com/v1/organizations/org_xyz789/knowledge/connectors/sources/authorize" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"slug": "google-sheets", "redirect_url": "https://app.example.com/callback"}'