Temitope Sam
07/28/2025, 7:55 AMkapa.ai
07/28/2025, 7:55 AMjson { "name": "Your YouTube Analytics Source Name", "sourceDefinitionId": "UUID-for-youtube-analytics-connector", "workspaceId": "YourWorkspaceID", "connectionConfiguration": { "credentials": { "client_id": "your-client-id", "client_secret": "your-client-secret", "refresh_token": "your-refresh-token" } } } - Replace the values with your actual credentials and IDs. - The sourceDefinitionId is specific to the YouTube Analytics connector and can be found in your Airbyte instance. - For Airbyte Cloud, the authentication may be handled via an OAuth flow, so the payload may differ slightly. The documentation confirms that the only required property is the credentials object for OAuth 2.0 authentication, but does not provide a full example payload. If you need the exact payload, you can inspect the network requests made by the Airbyte UI when creating a source, as suggested in other API-related discussions, to ensure your API call matches the expected format for your Airbyte deployment<sup>[YouTube Analytics Reference](https://docs.airbyte.com/integrations/sources/youtube-analytics#reference)</sup>. If you need a more detailed or specific example, please refer to your Airbyte instance's API documentation or use the UI to capture the exact payload.Temitope Sam
07/28/2025, 7:58 AMkapa.ai
07/28/2025, 7:58 AMkapa.ai
07/28/2025, 7:59 AMPOST /sources/initiateOAuth, which allows you to initiate the OAuth flow for a source. You need to provide the workspaceId, sourceType (which would be "youtube-analytics" for this connector), and a redirectUrl where the user will be sent after authentication. Optionally, you can include any additional OAuth input configuration required by the connector. The response will include a redirect_url that you can use to direct the user to the identity provider (Google) for authentication. After the user completes the OAuth flow, Airbyte will store the access and refresh tokens and return a secret ID to your redirect URL, which you can then use to create the source with credentials. Here’s a sample request body: json { "sourceType": "youtube-analytics", "redirectUrl": "https://your-app.com/oauth/callback", "workspaceId": "your-workspace-uuid" } This process is supported by the Airbyte API and is the recommended way to handle OAuth for connectors that support it, such as YouTube Analytics<sup>[Airbyte Public API - initiateOAuth](https://raw.githubusercontent.com/airbytehq/airbyte-platform/f284238f0099c4c0a3542d4c42a88773c45c363d/airbyte-api/src/main/openapi/api.yaml)</sup>. If you are using Airbyte Cloud, the UI also supports this flow, and you can simply click "Authenticate your account" during source setup to initiate OAuth<sup>[YouTube Analytics Setup Guide](https://docs.airbyte.com/integrations/sources/youtube-analytics#youtube-analytics)</sup>.Temitope Sam
07/28/2025, 8:23 AMkapa.ai
07/28/2025, 8:23 AMkapa.ai
07/28/2025, 8:23 AMcredentials object. - Even when using OAuth and a secret ID, you may need to include required fields such as auth_type or other connector-specific properties in the credentials object. - The exact structure of the credentials object may depend on the connector’s specification, and the secret ID itself is not simply passed as a top-level field but is managed internally by Airbyte. A relevant discussion highlights that omitting required fields (like auth_type) in the credentials object will result in schema validation errors, even if you have a valid secret ID. You should refer to the connector specification to determine the required fields for the credentials object. For example, for some Google connectors, you might need to provide: json { "credentials": { "auth_type": "Client" } } But for YouTube Analytics, the exact required fields are not detailed in the knowledge sources above. You will need to consult the connector specification in your Airbyte instance or inspect the UI network requests to confirm the exact payload structure required when using a secret ID from OAuth<sup>[secretId documentation unclear](https://github.com/airbytehq/airbyte/discussions/48607)</sup>. Summary: You must include a credentials object in your request body, even after completing OAuth, but the exact fields required are not specified in the provided documentation. Please refer to your connector’s specification for the precise structure.