Hello Sai,

To get these details the OAuth credentials used to make the API call should 
> be of manager account and the ClientCustomerId passing in the header should 
> be of manager account.


->Initially we do not have any customerId that could be pass to header. 
Which service/resource I need to use to get those Accounts?
My question , one user has just authorised my webapp to get the details of 
the adwords account, how can I know that which account he has given me 
access for?
I am asking similar service like $CustomerService->getCustomers(); that we 
used for Adwords API. 
We will then check if that is MCC account or normal account and then follow 
steps accordingly.


Thanks,


On Friday, 8 March 2019 01:23:19 UTC+5:30, googleadsapi-forumadvisor wrote:
>
> Hello Didier,
>
> To get the account hierarchy via Google Ads API, you could use the 
> customer_client 
> <https://developers.google.com/google-ads/api/docs/fields/customer_client> 
> resource. 
> Through which you can get only the resource name, level, Boolean value of 
> hidden status and Client_customer details of the accounts under your 
> manager account. To get these details the OAuth credentials used to make 
> the API call should be of manager account and the ClientCustomerId passing 
> in the header should be of manager account. Below is the sample query for 
> your reference. 
>
> Please note that, you have to iterate through all the customers to get the 
> descriptive_name. To keep the data normalized we are holding only one 
> resource responsible for a data field. 
>
> Query in PHP format is below:
>
> $query = 'SELECT customer_client.resource_name,
>                 customer_client.client_customer,
>                 customer_client.level, customer_client.hidden,
>                 customer_client.level
>                 FROM customer_client';
>
> Please let me know if you have any further questions.
>
> Regards,
> Sai Teja, Google Ads API Team
>
>
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and discussion group:
>     http://googleadsdeveloper.blogspot.com/search/label/adwords_api
>     https://developers.google.com/adwords/api/community/
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>
> Was your question answered? Please rate your experience with us by taking 
> a short survey.
> If not -- reply to this email and tell us what else we can do to help.
>
> Take Survey 
> <https://support.google.com/google-ads/contact/survey_transactional?caseid=6-3693000025583&hl=en&ctx=1>
>
> Also find us on our blog and discussion group:
> http://googleadsdeveloper.blogspot.com/search/label/adwords_api
> https://developers.google.com/adwords/api/community/
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/80889e5a-3d48-49b5-9216-82d210064593%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • GetAcco... Didier Roy
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
      • ... cv
        • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
          • ... cv
            • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to