airbyte
airbyte copied to clipboard
Provide correct grant_type in Apple Ads Oauth
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
- Follow the installation steps for the Apple Search ads extension at main (import the yaml into your builder)
- Test the source
- This should crash with the above-mentioned error
- 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 ❌