Anand Mohanan
08/20/2025, 7:36 PMkapa.ai
08/20/2025, 7:37 PM401 Unauthorized when calling /api/public/v1/sources) indicates an authentication or authorization issue when trying to create a Google Analytics 4 (GA4) source via the Airbyte API. Based on the knowledge sources, here are some key points and troubleshooting steps: 1. API Endpoint Differences: For Airbyte Cloud, the endpoint is POST /v1/sources. For Airbyte Open Source (OSS), the endpoint is /api/public/v1/sources, and requests should be sent to the webapp. Make sure you are using the correct endpoint for your deployment type. If you are using OSS, ensure your API requests are directed to the webapp, not the server backend directly. [Reference](https://github.com/airbytehq/airbyte/discussions/49937) 2. Authentication: A 401 Unauthorized error typically means your API request is missing valid authentication credentials or the credentials provided are incorrect or expired. - For Airbyte Cloud, you need to use an API key or token associated with your workspace. - For Airbyte OSS, if authentication is enabled, ensure you are including the correct token or credentials in your request headers. 3. Permissions: Even with valid credentials, the user or service account must have the necessary permissions to create sources. Double-check that the account you are using has the required access. 4. Request Format: Ensure your API request body and headers are correctly formatted according to the [API documentation](https://reference.airbyte.com/reference/createsource). If you have confirmed all of the above and are still seeing the error, please provide more details about your deployment (Cloud or OSS), how you are authenticating, and the exact API request you are making. I'm sorry, but the knowledge sources do not provide more specific troubleshooting steps for this exact error beyond the points above. If you need further help, please check your Airbyte deployment's authentication setup and consult the official API documentation for your version.Anand Mohanan
08/20/2025, 7:40 PMAnand Mohanan
08/20/2025, 7:42 PMkapa.ai
08/20/2025, 7:42 PMkapa.ai
08/20/2025, 7:42 PM/v1/sources endpoint and include your API key in the Authorization header. - For Airbyte OSS, use /api/public/v1/sources and ensure you are sending requests to the webapp, not the backend server directly, and include any required authentication headers. 5. No Evidence of Payload Issue There is no indication in the knowledge sources that the payload you provided would cause a 401 error if authentication is correct. Summary: Your payload is correct, but the 401 Unauthorized error is due to missing or incorrect authentication in your API request. Double-check your API endpoint and ensure you are including the required authentication headers for your Airbyte deployment type. The knowledge sources do not provide further troubleshooting for this specific error beyond these points. If you continue to have issues, please provide details about your authentication method and the exact API call (including headers, but redact any sensitive information) so further help can be provided. --- References: - [Airbyte API authentication and endpoint discussion](https://github.com/airbytehq/airbyte/discussions/49937)