Recommended Python library for Oauth

211 views
Skip to first unread message

Miguel Angel Garcia

unread,
Jun 24, 2022, 2:59:29 PM6/24/22
to Google Ads API and AdWords API Forum
I'm having trouble configuring Oauth with Python/Django and I would prefer to use a good library instead of my custom code.  

I want to use the Google Ads REST API (not gRPC and client libraries). 

I've seen that the Google API Python Client (the generic client, not the specific for Ads) recommends google-auth and google-auth-oauthlib (on https://github.com/googleapis/google-api-python-client/blob/main/docs/oauth.md)

I've also seen some people that recommend Python Social Auth (https://github.com/python-social-auth/social-app-django) for Oauth2 stuff in general.

But I've also seen some people having trouble with some "advanced" features that Google Ads API require (and other APIs don't) like persistent refresh tokens. 

Any tips or recommendations?

If this is not the place to ask this, please point me to the right place.

Thanks!

Google Ads API Forum Advisor

unread,
Jun 26, 2022, 10:29:16 PM6/26/22
to delval...@gmail.com, adwor...@googlegroups.com
Hi Miguel,

Thank you for raising this concern to the Google Ads API team.

With regard to your concern, it seems that this is more of a client library concern. That said, I would suggest reaching out to the Python client library owners by posting your concern in this Issue Tab in Github as they are more equipped to provide guidance to this matter.

Regards,
Google Logo
Carmela
Google Ads API Team
 


ref:_00D1U1174p._5004Q2cCkTM:ref

Miguel Angel Garcia

unread,
Jun 27, 2022, 3:18:40 AM6/27/22
to Google Ads API Forum Advisor, adwor...@googlegroups.com
Thanks, but I don't think so. As I've mentioned, I'm not using that Python client library at all, so they are probably going to say that is not their concern either. 

I guess I have to look for another place to ask. Any other suggestions? 

Google Ads API Forum Advisor

unread,
Jun 27, 2022, 7:50:41 AM6/27/22
to delval...@gmail.com, adwor...@googlegroups.com
Hi Miguel,

Thank you for the reply.

Since your concern is about configuring Oauth using the Google Ads REST API, then you may refer to this documentation as it demonstrates how you can complete the entire OAuth process and make an API request using the Desktop App flow with the REST API.

Best regards,
Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2cCkTM:ref
Reply all
Reply to author
Forward
0 new messages