<@U04S8PLJWMT> for snapchat public profiles api . ...
# ask-ai
m
@kapa.ai for snapchat public profiles api . For airbyte is it enough to create one oauth app and get the refresh token for it and store it in airbyte to start pulling public profiles data?
k
Yes, for Airbyte Open Source, it is generally sufficient to create one OAuth app in Snapchat, obtain the refresh token through the OAuth2 authentication workflow, and then store the Client ID, Client Secret, and Refresh Token in Airbyte to start pulling data from the Snapchat Marketing API—including public profiles data, if the API and your app permissions allow it. The documented setup process is as follows: 1. Register your OAuth2 app in Snapchat and save the Client ID and Client Secret. 2. Manually complete the OAuth flow to obtain a refresh token (by exchanging the authorization code for tokens). 3. Enter the Client ID, Client Secret, and Refresh Token into the Airbyte source connector configuration. This approach is described as the "partial OAuth (legacy)" flow, where you manually obtain and provide the tokens to Airbyte. Airbyte will then use these credentials to automatically refresh the access token as needed for ongoing data syncs. Note that you must ensure your OAuth app has the correct scopes and permissions for the data you want to access (such as public profiles) and that the refresh token remains valid for continued access[Snapchat Marketing Setup Guide](https://docs.airbyte.com/integrations/sources/snapchat-marketing#step-2-set-up-the-source-connector-in-airbyte) [Partial OAuth (legacy)](https://docs.airbyte.com/platform/1.8/connector-development/connector-builder-ui/authentication#partial-oauth-legacy). If the Snapchat API for public profiles is covered by the same OAuth app and permissions as the marketing API, this process will work. If the API requires different scopes or a separate app, you may need to adjust accordingly. The knowledge sources do not specify any additional requirements for public profiles specifically.
m
@kapa.ai in my oath app can i use a test redirect url just one time to get the tokens just? Is this enough?
k
A message from kapa.ai
Yes, according to the Airbyte documentation for the Snapchat Marketing connector, when setting up your OAuth2 app, you are required to provide a
redirect_url
parameter. The documentation states: > If you have the API endpoint that will handle next OAuth process, write it to this parameter. If you do not have the API endpoint, simply use a valid URL. Refer to the discussion here for more information: [Snapchat Redirect URL - Clarity in documentation please](https://github.com/Snap-Kit/bitmoji-sample/issues/3) This means you can use a test or placeholder redirect URL just to complete the OAuth flow and obtain your tokens. Once you have the refresh token, you can use it in Airbyte, and the redirect URL is not needed for ongoing data syncs. This is sufficient for Airbyte’s partial OAuth (legacy) flow, where you manually obtain and provide the tokens to Airbyte for continued use. Just ensure the redirect URL you use is accepted by Snapchat when registering your app and during the token exchange process[Snapchat Marketing Setup Guide](https://docs.airbyte.com/integrations/sources/snapchat-marketing). So, yes, using a test redirect URL one time to get the tokens is enough for Airbyte’s needs.
m
@kapa.ai do you think using cloudfare or ngrok is good for the redirect url app?
k
A message from kapa.ai
The knowledge sources do not explicitly mention using Cloudflare or ngrok as solutions for the redirect URL when setting up OAuth with Airbyte and Snapchat. However, there are references to using a valid URL for the redirect, and some users have used tools like ngrok to expose local Airbyte instances for OAuth flows. For example, one user described exposing their local Airbyte instance with ngrok to handle OAuth redirects, though they encountered some issues and sought further guidance on configuration[Issue with /initiateOAuth API on Local Airbyte Instance](https://github.com/airbytehq/airbyte/issues/50977). In summary, while the documentation does not officially recommend Cloudflare or ngrok, using such services to provide a publicly accessible redirect URL is a common practice for local development and testing OAuth flows. Just ensure the redirect URL you register matches the one used during the OAuth process, and be aware of any limitations or security considerations with these tools.
m
@kapa.ai what should i use for the oauth app then?
k
A message from kapa.ai
For your Snapchat OAuth app, you should use a valid redirect URL when registering the app. The Airbyte documentation for the Snapchat Marketing connector states: > If you have the API endpoint that will handle next OAuth process, write it to this parameter. If you do not have the API endpoint, simply use a valid URL. This means you can use any valid URL as the redirect URI for the purpose of obtaining your tokens. If you are just obtaining the refresh token once (for use in Airbyte), you do not need a production-ready endpoint. You can use a test URL, a local endpoint exposed via a tool like ngrok, or any URL that Snapchat will accept and that you can access to capture the authorization code during the OAuth flow. Once you have the refresh token, you do not need the redirect URL for ongoing Airbyte usage — just enter the Client ID, Client Secret, and Refresh Token into Airbyte[Snapchat Marketing Setup Guide](https://docs.airbyte.com/integrations/sources/snapchat-marketing). So, for the OAuth app, use a redirect URL that is valid and accessible for your one-time token exchange. This is sufficient for Airbyte’s needs.