how to get customer Id using refresh token which are not under my MCC account using Google Ads API (Bita version)

347 views
Skip to first unread message

Rakesh Chauhan

unread,
Jan 10, 2020, 2:50:02 AM1/10/20
to AdWords API and Google Ads API Forum
Hello ,

can you please provide me information how can we get Customer ID using Oauth 2.0 or refresh token in Google Ads API(Bita version)

SUBINPVASU

unread,
Jan 10, 2020, 3:07:49 AM1/10/20
to addon....@gmail.com, AdWords API and Google Ads API Forum
See if this would work??
     public function GetAccountDetails(AdWordsServices $adWordsServices, AdWordsSession $session,$refresh_token)
  {
      $customerService = $adWordsServices->get($session, CustomerService::class);
      $account = $customerService->getCustomers();
      foreach ($account as $customers)
      {
           $customer[] = array(
          'customerid'=>$customers->getCustomerId(),
          'customername'=>$customers->getDescriptiveName(),
          'manager'=>$customers->getCanManageClients(),
          'test_account'=>$customers->getTestAccount(),
          'refresh_token'=>$refresh_token
      );
      }
      return $customer;
  }

On Fri, Jan 10, 2020 at 1:20 PM Rakesh Chauhan <addon....@gmail.com> wrote:
Hello ,

can you please provide me information how can we get Customer ID using Oauth 2.0 or refresh token in Google Ads API(Bita version)

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/46e5ab0e-f5bd-4f6b-9bb8-b085b63a642c%40googlegroups.com.


--
subinpvasu
9495546474

SUBINPVASU

unread,
Jan 10, 2020, 3:08:45 AM1/10/20
to addon....@gmail.com, AdWords API and Google Ads API Forum
Create $session using respective MCC ID
--
subinpvasu
9495546474

Rakesh Chauhan

unread,
Jan 10, 2020, 3:27:36 AM1/10/20
to AdWords API and Google Ads API Forum
But where you have used refresh token to get customer Id of new logn user ?  

Google Ads API Forum Advisor Prod

unread,
Jan 10, 2020, 12:05:12 PM1/10/20
to addon....@gmail.com, adwor...@googlegroups.com

Hi Rakesh,

 

Thank you for reaching out to us. Please look at this guide for information on how to set up OAuth2 authentication and how to obtain your client ID and client secret. If you need your customer ID, please click the “?” button on the Google Ads UI account page and your 10-digit "viewing customer ID" should be listed below. If you have further questions please let me know.

 

Thank you,

Bryan, Google Ads API Team



ref:_00D1U1174p._5001USw31U:ref

Rakesh Chauhan

unread,
Jan 16, 2020, 3:49:29 AM1/16/20
to AdWords API and Google Ads API Forum
Hy SUBINPVASU

Thank you for giving me reply but i don't want to get my own account Customer id,
I want that Customer ID of user own Adwords which are login in my platform using gmail account. 


On Friday, January 10, 2020 at 1:20:02 PM UTC+5:30, Rakesh Chauhan wrote:

Google Ads API Forum Advisor Prod

unread,
Jan 16, 2020, 11:44:19 AM1/16/20
to addon....@gmail.com, adwor...@googlegroups.com

Hi Rakesh,

Can I confirm that you’re looking for the customer IDs of the client Accounts under your own MCC Manager Account? If so, you can log into your account in the Google Ads UI and click “Accounts” to see the list of accounts under your MCC and their corresponding Customer IDs.

If you’re referring to the users that also log into your account, you can see the list of users and their emails under “Tools and Settings” > “Account Access”. Here you should see all the users that have access to your account. They individually do not have their own Customer IDs.

Please let me know if you have further questions.

Reply all
Reply to author
Forward
0 new messages