Is there a way to check if a customer is connected to my application?

108 views
Skip to first unread message

Özgür Nevres

unread,
Jan 3, 2023, 8:27:53 AM1/3/23
to Google Ads API and AdWords API Forum
  Hi,

I am developing an application using Google Ads API (technology: C#).
Users (customers) are connecting via "Connect with Google" and giving permission to my application. That's OK.

My question is: is there a way to understand programmatically if a customer is still connected to my app? For example, I'll pass the CustomerId to check if s/he is still enabled my app to manage their Ads account.

Now I can check this by calling ListAccessibleCustomers(). If it throws an exception, I analyze the exception and decide if s/he is still connected to my app.

Is there a more "formal" way to do this?

Zweitze

unread,
Jan 3, 2023, 10:02:08 AM1/3/23
to Google Ads API and AdWords API Forum
Do you mean that you like to find out that a Refresh Token is still valid? After all, that permission can be withdrawn without your app knowing.

If that's your question, requesting just an Access Token does the trick. But the C# client library completely hides this logic, in which case calling customers.listAccessibleCustomers() is the best option. Now this gives some overhead, but your next question is probably how to find out whether your user still has access to the same MCCs as he had last time - to find out you need that same method.

Özgür Nevres

unread,
Jan 3, 2023, 10:10:26 AM1/3/23
to Google Ads API and AdWords API Forum
Yes I want to check that if the Refresh Token is still valid or not. Yes, as you said, the permission can be withdrawn without my app knowing.
Thanks for the answer.


Google Ads API Forum Advisor

unread,
Jan 3, 2023, 2:36:34 PM1/3/23
to ozgur....@earnado.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

Since you mentioned that you push the app to production and it is asking for verification then I can refer you to this document on the "When to go through verification".

In addition, it appears that you haven't followed the Oauth verification process. With this, I suggest that you please follow the instruction below:

How to verify: OAuth API verification FAQs - Google Cloud Platform Console Help
General information: Unverified apps - Google Cloud Platform Console Help

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


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