Hello team,
Every couple of days, our scripts that make calls to the Google Ads API stop working because we're not able to obtain an access token. The request of getting an access token always comes back with the error: Invalid Grant - Bad Request.
We've been facing the same issue for some time now and we tried every relevant solution we can find online but nothing seems to be a permanent solution.
googleads_client = GoogleAdsClient.load_from_storage('google-ads-credentials.json', version='v9') # our code breaks here
ga_service = googleads_client.get_service('GoogleAdsService')
[...]
response = ga_service.search(customer_id=str(customer_id), query=query)
Also, we made sure that our Publishing Status is set to production mode in our 'OAuth Consent Screen' section of our Google Cloud Project.
Can you please advise on how we can keep the refresh token working so that our scripts can proceed with making API calls without any interruptions?