<@U04S8PLJWMT> I’m trying to automate the creation...
# ask-ai
d
@kapa.ai I’m trying to automate the creation of a Facebook Marketing source in Airbyte Cloud via the API. I want to use the official Airbyte OAuth flow for Facebook, so that users can authenticate their own Facebook accounts. Here’s what I’ve tried: • Using the
POST /v1/sources/create
endpoint with an API key: I get a
401 Unauthorized
error. • Using the v1 endpoints like
/sources
with a Bearer token: same issue. • Direct cURL requests to create a source with a static access token work, but that obviously bypasses the user’s own authentication. My questions: 1. Is it currently possible to programmatically create a Facebook Marketing source in Airbyte Cloud while still using Airbyte’s OAuth flow for user authentication? 2. If not, are there any recommended workarounds or best practices for automating Facebook source creation for multiple users in Airbyte Cloud? Thanks in advance!
k
Sorry @Diana, I'm currently experiencing some technical difficulties. Please try again in a few minutes. If this issue persists, please reach out to the administrators of this Slack workspace.
d
@kapa.ai Hi again, I’m trying to automate the creation of a Facebook Marketing source in Airbyte Cloud via the API. I want to use the official Airbyte OAuth flow for Facebook, so that users can authenticate their own Facebook accounts. Here’s what I’ve tried: • Using the
POST /v1/sources/create
endpoint with an API key: I get a
401 Unauthorized
error. • Using the v1 endpoints like
/sources
with a Bearer token: same issue. • Direct cURL requests to create a source with a static access token work, but that obviously bypasses the user’s own authentication. My questions: 1. Is it currently possible to programmatically create a Facebook Marketing source in Airbyte Cloud while still using Airbyte’s OAuth flow for user authentication? 2. If not, are there any recommended workarounds or best practices for automating Facebook source creation for multiple users in Airbyte Cloud? Thanks in advance!
k
A message from kapa.ai
Sorry @Diana, I'm currently experiencing some technical difficulties. Please try again in a few minutes. If this issue persists, please reach out to the administrators of this Slack workspace.
d
@kapa.ai Hi again, I’m trying to automate the creation of a Facebook Marketing source in Airbyte Cloud via the API. I want to use the official Airbyte OAuth flow for Facebook, so that users can authenticate their own Facebook accounts. Here’s what I’ve tried: • Using the
POST /v1/sources/create
endpoint with an API key: I get a
401 Unauthorized
error. • Using the v1 endpoints like
/sources
with a Bearer token: same issue. • Direct cURL requests to create a source with a static access token work, but that obviously bypasses the user’s own authentication. My questions: 1. Is it currently possible to programmatically create a Facebook Marketing source in Airbyte Cloud while still using Airbyte’s OAuth flow for user authentication? 2. If not, are there any recommended workarounds or best practices for automating Facebook source creation for multiple users in Airbyte Cloud? Thanks in advance!
k
A message from kapa.ai
Sorry @Diana, I'm currently experiencing some technical difficulties. Please try again in a few minutes. If this issue persists, please reach out to the administrators of this Slack workspace.
d
@kapa.ai could you help me with a query regarding the Airbyte Cloud API?
k
A message from kapa.ai
Of course! Please go ahead and ask your query regarding the Airbyte Cloud API. I’ll do my best to answer it based on the available knowledge sources. If there’s not enough information in the sources, I’ll let you know.
d
@kapa.ai I’m trying to automate the creation of a Facebook Marketing source in Airbyte Cloud via the API. I want to use the official Airbyte OAuth flow for Facebook, so that users can authenticate their own Facebook accounts. Here’s what I’ve tried: • Using the
POST /v1/sources/create
endpoint with an API key: I get a
401 Unauthorized
error. • Using the v1 endpoints like
/sources
with a Bearer token: same issue. • Direct cURL requests to create a source with a static access token work, but that obviously bypasses the user’s own authentication. My questions: 1. Is it currently possible to programmatically create a Facebook Marketing source in Airbyte Cloud while still using Airbyte’s OAuth flow for user authentication? 2. If not, are there any recommended workarounds or best practices for automating Facebook source creation for multiple users in Airbyte Cloud?
k
A message from kapa.ai
Sorry @Diana, I'm currently experiencing some technical difficulties. Please try again in a few minutes. If this issue persists, please reach out to the administrators of this Slack workspace.
d
@kapa.ai Is it possible to programmatically create a Facebook Marketing source in Airbyte Cloud using Airbyte’s OAuth flow for user authentication, without using the Airbyte UI?
k
A message from kapa.ai
Based on the available knowledge sources, it is not currently possible to programmatically create a Facebook Marketing source in Airbyte Cloud using Airbyte’s OAuth flow for user authentication without using the Airbyte UI. The OAuth flow in Airbyte Cloud is designed to be interactive, requiring the user to complete the OAuth consent screen in the UI. There is no documented or officially supported way to trigger the OAuth consent flow and capture the resulting tokens programmatically via the API. The only supported method is for each user to authenticate interactively via the Airbyte UI, after which Airbyte manages the credentials for the source. This limitation is acknowledged by the Airbyte team, and there are currently no documented workarounds or best practices for automating this process for user-driven OAuth flows in Airbyte Cloud ([secretId documentation unclear](https://github.com/airbytehq/airbyte/discussions/48607)). If you attempt to create a source programmatically with static tokens, it bypasses the user authentication flow and does not leverage Airbyte’s managed OAuth, which is not suitable for scenarios where each user must authenticate their own account.
d
@kapa.ai So I can't programmatically set up the connector for clients via the API, while the OAuth authorization step is still completed by the client in a browser using a airbyte-generated URL - ie. using OAuth link with the API (
/v1/sources/createOAuthLink
) to create the source?
k
A message from kapa.ai
I'm sorry, but the knowledge sources do not provide explicit documentation or confirmation that you can programmatically set up a Facebook Marketing source in Airbyte Cloud by generating an OAuth link (such as with a
/v1/sources/createOAuthLink
endpoint), having the client complete the OAuth step in their browser, and then finalizing the source creation via the API. The available sources indicate that the OAuth flow in Airbyte Cloud is designed to be interactive and UI-driven, and there is no clear, documented API flow for generating an OAuth link and completing source creation programmatically for user-driven OAuth connectors like Facebook Marketing. The Airbyte team has acknowledged this gap and the lack of documentation for such automation scenarios, especially for managed OAuth flows in Airbyte Cloud. As of now, the process is not officially supported or documented for full automation outside the UI, and there are no details about a
/v1/sources/createOAuthLink
endpoint in the provided sources [secretId documentation unclear](https://github.com/airbytehq/airbyte/discussions/48607). If you need this functionality, you may need to reach out to Airbyte support or monitor their documentation for future updates.