Hello Ben,
Looks like this example was not updated. ClientCustomerId is a required
field now.
You can resolve the issue by changing line
graph = adwords.use_mcc() {managed_customer_srv.get(selector)}
to
graph = managed_customer_srv.get(selector)
Also, would you mind logging a bug on the tracker regarding this issue?
https://github.com/googleads/google-api-ads-ruby/issues
-Danial, AdWords API Team.
On Monday, December 22, 2014 4:54:17 AM UTC+3, Ben Zhang wrote:
>
> We are using API to download ad performance reports for all our customers.
> The hierarchy is this:
>
> One top level account has many MMC accounts, each of which has many
> customer accounts. So I have a client_id for the top level account, an
> client_id each for each MMC and many client_customer_ids, one for each end
> customer.
>
> I am using this script:
>
> https://github.com/googleads/google-api-ads-ruby/blob/master/adwords_api/examples/v201409/account_management/get_account_hierarchy.rb
>
> I tried to generate oauth access token in the yml file using the top
> account client_id and MCC client_id and then run get_account_hierarchy. I
> always ended up with the error
>
> *Message: [AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED @ ;
> trigger:'<null>']*
> *Errors:*
> * Error [1]:*
> * field_path: *
> * trigger: <null>*
> * error_string: AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED*
> * api_error_type: AuthenticationError*
> * reason: CLIENT_CUSTOMER_ID_IS_REQUIRED*
> * xsi_type: AuthenticationError*
>
> Does anyone know why? Is this the right approach to get a whole list of
> client_customer_ids ?? My gut feeling is that I am filling up the yml file
> wrong.
>
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/e9f0eff3-4567-4d2a-b083-f1dd96b50821%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.