googleads / google-api-ads-ruby

Ad Manager SOAP API Client Libraries for Ruby
297 stars 227 forks source link

[AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED @ ; trigger:'<null>'] #110

Closed alfie-max closed 8 years ago

alfie-max commented 8 years ago

Using the said example setup_oauth2.rb updated the adwords_api.yml with the oauth_token.

Then executing get_account_hierarchy.rb gives the following 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

Might be a duplicate of Issue #54. But updating the gem didn't help. Currently using the latest version 0.22.0

I need to call CustomerService.getwhich i believe is what get_account_hierarchy.rb does (Correct me if i'm wrong). So that i can get the Customer ID of the authenticated user's adwords account.

mcloonan commented 8 years ago

The get_account_hierarchy.rb example is using the ManagedCustomerService, not the CustomerService. The ManagedCustomerService requires that you specify a Client Customer ID for the Manager account that has the client accounts within it that you want to fetch.

This doesn't seem to be a Ruby library specific issue, so I'm going to close this. Please use our forum for general AdWords API assistance.