Fetch customer Id using email & Create new Google Ads Manager account

131 views
Skip to first unread message

Amol Kawale

unread,
Jul 26, 2021, 6:49:04 AM7/26/21
to AdWords API and Google Ads API Forum
Hello,

I'm using Google Ads API PHP library in my system. But I didn't found following 2 API's in provided API list here https://developers.google.com/google-ads/api/docs/account-management/create-account:
1. API to find out whether user has already exist Google Ads account using email? If found then returns his 10 digit customer ID.
2. If user Google Ads account not found then create new Google Ads account (manager account on behalf of customer through our PHP script). So that after creating, I can link it under my manager account.

I have seen same process on few sites. Whenever user visits system, he entering his email address, name, etc.. then script searches for his existing Google Ads account if found return customer id or some data & auto logged-in to system otherwise creates new Google Ads manager account for him.

Please let me know any API or solution for these 2 cases.

Thanks,
Amol

Amol Kawale

unread,
Jul 27, 2021, 9:37:19 AM7/27/21
to AdWords API and Google Ads API Forum
Any updates pls?

Google Ads API Forum Advisor

unread,
Jul 27, 2021, 10:44:43 AM7/27/21
to a.ka...@sweply.com, adwor...@googlegroups.com
Hi Amol,

Thanks for reaching out. Please note that although the client libraries provide examples for many potential uses, not all possible examples are given. For your first inquiry "API to find out whether user has already exist Google Ads account using email", it seems you may be able to make use the List Acccessible Accounts example, to see which accounts are reachable by a specific Ads user. Examples for linking client customer accounts with managers can be found here.

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2JDiJC:ref

Amol Kawale

unread,
Aug 30, 2021, 7:09:33 AM8/30/21
to AdWords API and Google Ads API Forum
Hi Matt,

User will come on my site & will select his email. Then using OAUTH2 javascript library user will do login to his gmail. We can retrieve email, profile but cant his google ads customer id though he given permission to access his account in oauth2.

another case if user doesn't have gmail then how to tackle situation.

Regards,
Amol 

Google Ads API Forum Advisor

unread,
Aug 31, 2021, 2:52:46 AM8/31/21
to a.ka...@sweply.com, adwor...@googlegroups.com
Hi Amol,

Thanks for the reply. I work with Matt and let me provide support to your concern.

To clarify, the List Accessible Accounts can be used to get the Google ads accounts and it will use OAuth credential you've set in your client library, not email address. With this, this is the possible workaround for your follow up question.

As for the your question to determine the customer accounts by using email address, then I am afraid that this is not possible.

Let me know if you have further questions.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2JDiJC:ref

Amol Kawale

unread,
Aug 31, 2021, 9:49:55 AM8/31/21
to AdWords API and Google Ads API Forum
Thanks for reply but our requirement is slight different. 

User comes to our system & choose Google login for campaigns management. Then we are authenticating user with Oauth2 php JavaScript library. In response we can get email, profile image.... but how to get users Google Ads account ex. customer ID. User has given access to his ads account to manage campaigns through Oauth2 login as well. 

Pls help to get ads account details after scope allowed through APP.

Regards,
Amol

Google Ads API Forum Advisor

unread,
Sep 2, 2021, 12:07:48 PM9/2/21
to a.ka...@sweply.com, adwor...@googlegroups.com
Hi Amol,

It seems like you are looking for the customer_user_access resource. You can also use the attributed resource, customer, to retrieve the customer ID.

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


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