Refresh token and adclient

89 views
Skip to first unread message

jimmy m

unread,
Jan 30, 2022, 3:27:28 PM1/30/22
to Google Ads API and AdWords API Forum
How you migrate these 2 lines of code from adwords api to google ads api using the new google-ads-python package?

from
googleads import adwords (old package)
from googleads import oauth2  (old package)

oauth2_client = oauth2.GoogleRefreshTokenClient(client_id, client_secret, refresh_token)
ac = adwords.AdWordsClient(developer_token, oauth2_client, user_agent)

Google Ads API Forum Advisor

unread,
Jan 31, 2022, 2:10:00 AM1/31/22
to ji...@vadakoconsulting.com, adwor...@googlegroups.com

Hello Jimmy,

Thank you for reaching out to us.

Since you're using Google Ads API in python, we recommend using the Python client library instead. For its authentication, you can then check the available guides below:

Regards,

Google Logo
Mark Kevin Albios
Google Ads API Team
 


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