googleads / googleads-python-lib

The Python client library for Google's Ads APIs
Apache License 2.0
683 stars 975 forks source link

Out of Band oAuth is being deprecated #512

Closed feliperyan closed 1 year ago

feliperyan commented 1 year ago

The example at https://github.com/googleads/googleads-python-lib/blob/441df98ce8a7a8d1a33608da20339ab1eb54f3b7/examples/adwords/authentication/generate_refresh_token.py#L35 refers to the legacy Out of Band flow.

More info: https://developers.google.com/identity/protocols/oauth2/resources/oob-migration

msaniscalchi commented 1 year ago

Thanks for the report. The AdWords API is currently sunset, and we'll be making some adjustments to remove it from this library soon. One of the consequences is that this particular example will be removed.

dubirajara commented 1 year ago

@msaniscalchi any news?, can you provide an example of how to generate the refresh token?

msaniscalchi commented 1 year ago

Hello, sure, as I reported in my earlier message, we removed the related example given that it was for a sunset API that is no longer supported.

That said, if you're just looking for samples that step through OAuth 2.0 for the updated installed application flow, you might want to look to our other libraries for inspiration–for example, you could modify the generate_user_credentials.py sample used for the Google Ads API for other APIs that support that flow.

As an aside, although it is technically still possible, the installed application flow is not recommended for use with Ad Manager.