airbyte icon indicating copy to clipboard operation
airbyte copied to clipboard

Provide correct grant_type in Apple Ads Oauth

Open olagjo opened this issue 4 months ago • 2 comments

Based on our testing of this source, it seems like an explicit specification of grant_type: client_credentials is necessary in order not to crash the DeclarativeOauth2Authenticator.

When no grant type is specified, it expects grant type refresh token, but we have no refresh token and attempt to use client credentials

This fixes https://github.com/airbytehq/airbyte/issues/46879

What

Avoid OAuth ValueError "OauthAuthenticator needs a refresh_token parameter when grant_type is set to refresh_token when initializing a new Apple Search Ads source.

How

Explicitly specify that grant_type is client_credentials (this is already reflected in the url that we try to use)

Review guide

  1. Follow the installation steps for the Apple Search ads extension at main (import the yaml into your builder)
  2. Test the source
  • This should crash with the above-mentioned error
  1. Apply the fix from this PR (explicitly set grant_type to client_credentials in the auth-yaml) and retest
  • You should now receive data 🎉

User Impact

Now it should be possible to set up new Apple Search Ads sources again 🎉

Can this PR be safely reverted and rolled back?

  • [x] YES 💚
  • [ ] NO ❌

olagjo avatar Oct 10 '24 13:10 olagjo