Search code examples
google-cloud-platformoauth-2.0google-apigoogle-ads-api

How to change settings of my app using Google Ads API so that refresh token doesn't expire?


I made a script using Google Ads API to get reports from Google Ads. But the refresh token expires every 7 days. I found out that it happens because the app should be published (have publishing status "In production" instead of "Testing"). So I did it. But then the Verification status changed to "Needs verification". An option "Prepare for verification" appears

If I try to "Prepare for verification" than it requires to authorize domain of my app. So this is an option for cases when someone wants to make an app for multiple users.

But it's not my case, I just get reports from my own Google Ads account. I found out that probably the problem could be solved if I change User type of my app from "External" to "Internal". But it seems that it only an option for Google Workspace users.

But as I see on their site it is not free.

I am sure there should be some free option how to do this. Everything else works fine, the problem is just the refresh token expiration. Maybe I missed something, please help.


Solution

  • There is, just set it to test and add yourself as a user.

    enter image description here