OAuth2 desktop app or web app flow, which one to use?

96 views
Skip to first unread message

Kommid

unread,
Jul 29, 2022, 6:03:09 AM7/29/22
to Google Ads API and AdWords API Forum

I'm building a reporting website for a customer, where they can see basic metrics of their google ads campaigns like impressions, clicks, ctr, conversions and costs. Data are obtained from google ads api via the PHP library once every day. My problem is, that my refresh token expires after 7 days, because I have set it to testing.
In order to set it to production, I have to provide a demo video of how data are used, an a lot of other stuff, just for a website that is intended for internal use of only one single customer.
All this seems a bit over the top to me. Is there a simpler way of accomplishing what I want to do?

Google Ads API Forum Advisor

unread,
Jul 29, 2022, 8:34:05 AM7/29/22
to mahag-mar...@kommid-muc.de, adwor...@googlegroups.com
Hi Kommid,

Thank you for reaching out to us.

You are correct that the refresh token expires after 7 days if you have set the publishing status of it to testing. For you to change it, You can go to the Google API Console and navigate to the OAuth consent screen then change the publishing status to “In production” following these instructions to avoid the refresh token expiring in 7 days. If this is indeed the same with the instructions you are referring to then I’m afraid that there are no ways to extend the 7 days expiration of the refresh token if you do not change the publishing status to “In production”.

Also, you can read a little more in the big red bar at the top of our OAuth page here: https://developers.google.com/google-ads/api/docs/first-call/oauth-cloud-project

If your public application uses scopes that permit access to certain user data, it must complete a verification process. If you're an Apps Script developer, and the project owner is using a Google Workspace account and the project is only used by Google Accounts in the project owner's domain, then your project is automatically internal-only. Learn more about OAuth Client Verification Applicability. If your app is only for your organization or Google Workspace domain, you can mark it as internal-only in the OAuth consent screen configuration:
  1. Go to the Cloud Console OAuth consent screen page.
  2. Click the Project selector drop-down at the top of the page.
  3. On the Select from dialog that appears, select your project.
  4. Under User type, select Internal, and then click Save.
An internal application will only allow access to users from your organization (@your-organization.com). For information on OAuth Verification, and how to verify your projects, please refer to the below links:
How to verify: OAuth API verification FAQs - Google Cloud Platform Console Help
General information: Unverified apps - Google Cloud Platform Console Help

Best regards,
Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2d2rB8:ref
Message has been deleted
Message has been deleted
Message has been deleted

Google Ads API Forum Advisor

unread,
Aug 1, 2022, 10:55:07 AM8/1/22
to mahag-mar...@kommid-muc.de, adwor...@googlegroups.com
Hi Markus,

Thank you for the reply. I work with Heidi and let me provide support here.

I’m adding in a colleague that should be able to assist further. In the meantime here is some information on OAuth Verification, and how to verify your projects: 
As per your concern related to the deleted messages, I also raise this to the team. We will provide updates once available.

Best regards,
Google Logo
Jinky
Google Ads API Team
 


ref:_00D1U1174p._5004Q2d2rB8:ref

Kommid

unread,
Aug 5, 2022, 4:32:36 AM8/5/22
to Google Ads API and AdWords API Forum
Hello Jinky,
did you get my last message a few days ago?
Kind Regars
Markus

Google Ads API Forum Advisor

unread,
Aug 16, 2022, 10:06:42 AM8/16/22
to mahag-mar...@kommid-muc.de, adwor...@googlegroups.com
Hello,

My team doesn't have specific expertise in the verification process. I'm not sure where you're reading that, but it sounds like a question that would be better suited for the team that assists you with the verification once you submit the verification request.

If you have any questions about the API specifically, or don't hear back from the verifications team once you submit your request, let me know and I'll be glad to help you out.

Regards,
Mike, Google Ads API Team

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