Ruby Report Utils 'Missing Client Information' error

695 views
Skip to first unread message

Matthew Ledom

unread,
Jul 8, 2013, 2:47:23 PM7/8/13
to adwor...@googlegroups.com
I'm trying to download the CRITERIA_PERFORMANCE_REPORT for all the fields that are allowed. I keep receiving the following error:

<reportDownloadError><ApiError><type>ReportDownloadError.INVALID_PARAMETER</type><trigger>Missing client information</trigger><fieldPath></fieldPath></ApiError></reportDownloadError>

I'm currently setting the clientCustomerId header value and auth params like so:

{"Content-Type"=>"application/x-www-form-urlencoded",
 "Authorization"=>
  "GoogleLogin auth=auth token",
 "User-Agent"=>
  "test_client (AwApi-Ruby/0.9.1, Common-Ruby/0.9.2, Savon/1.2.0, ruby/1.9.3, HTTPI/1.1.1, curb)",
 "clientCustomerId"=>"xxx-xxx-xxxx",
 "developerToken"=>"my_dev_token"}

Is there something I'm missing with regards to the client information. I tried adding the client customer id as a predicate for filtering but that didnt work either. I was trying to follow the examples at https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201302/reporting/download_criteria_report.rb but I'm not having an luck due to this "Missing Client Information" problem.

Danial Klimkin

unread,
Jul 8, 2013, 4:42:43 PM7/8/13
to adwor...@googlegroups.com
Hi Matthew,


This error means you are not sending the clientCustomerId correctly. How do you pass the account ID to the library?


-Danial, AdWords API Team.

Matthew Ledom

unread,
Jul 8, 2013, 6:59:00 PM7/8/13
to adwor...@googlegroups.com
I'm sending the clientCustomerId as a string "xxx-xxx-xxxx" and passing it in the download_report and download_report_as_file methods. I also have the  id set in the headers of the request as  "clientCustomerId"=>"xxx-xxx-xxxx".

Danial Klimkin

unread,
Jul 9, 2013, 6:18:47 PM7/9/13
to adwor...@googlegroups.com
This is very strange. Can you share the application code and your configuration file with me over email (Reply to Author link)?


-Danial, AdWords API Team.

Matthew Ledom

unread,
Jul 9, 2013, 8:02:10 PM7/9/13
to adwor...@googlegroups.com
Sent, thanks for helping.

MrHuluBanulu

unread,
Dec 9, 2013, 2:41:29 PM12/9/13
to adwor...@googlegroups.com
I have the same exact Problem, I think, How did this resolve?
I have a server running a job that pulls data from Google Adword API(I am not using OAUTH2), the SOAP request are working fine. I'm using the same structure as Matthew when posting the request to https://adwords.google.com/api/adwords/reportdownload/v201309, but it resolves in the same error.
<reportDownloadError>
   <ApiError>
      <type>ReportDownloadError.INVALID_PARAMETER</type>
      <trigger>Missing client information</trigger>
      <fieldPath/>
   </ApiError>
</reportDownloadError>

What am I missing?


Thanks,
MrHuluBanulu From Jupiter

Matthew Ledom

unread,
Dec 9, 2013, 3:23:07 PM12/9/13
to y.lo...@gmail.com, adwor...@googlegroups.com
I’m not using the adwords rails gem for this. I basically wrote my own method to handle reports setting all the header info myself.

-- 
Matthew Ledom
VP of Engineering
BrightWhistle Inc.
Sent with Sparrow

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords 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 a topic in the Google Groups "AdWords API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/LaZbaUj3LKg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Danial Klimkin

unread,
Dec 9, 2013, 4:08:19 PM12/9/13
to adwor...@googlegroups.com
Hello MrHuluBanulu,


Please make sure you provide AuthToken (for ClientLogin) and ClientCustomerId in your request.

Did you see the demo application example that implements the report download?



-Danial, AdWords API Team.

MrHuluBanulu

unread,
Dec 9, 2013, 5:35:04 PM12/9/13
to adwor...@googlegroups.com
Hey Guys,

Thank you for your help!

Danial: I did see the example, but I'm not using the API, as I don't know how to utilize it without OAUTH2, which as far as I understand is not relevant for my use case.
I tried to drill down, to the get_report_request_headers , but there is an authentication call there, which, i guess isn't suitable.
I'm providing the same ClientCustomerId and autoToken I'm using in the SOAP request for other Adwords API services(such as DataService, AdGroupService ETC.)
reqHeaders = {"__rdxml"=>"[reportDefinitionXML]",
  "Content-type" => "application/x-www-form-urlencoded" ,
    "Authorization"=> 'GoogleLogin auth=[The authToken I use in SOAP req]',
    "developerToken"=>'[devToken same as SOAP req]',
    "clientCustomerId"=> '[CustomerIds same as SOAP]',
    "returnMoneyInMicros"=> true
    }
Im trying to make the Post with mechanize
require 'open-uri'
require 'mechanize'
agent=Mechanize.new{|a| a.ssl_version, a.verify_mode = 'SSLv3', OpenSSL::SSL::VERIFY_NONE}

And tried it manually with SOAPUI, same results.

Any clue ? Suggestions?

Danial Klimkin

unread,
Dec 12, 2013, 1:12:59 PM12/12/13
to adwor...@googlegroups.com
Hello,


Please note ClientLogin is deprecated and v201309 is the latest version to support it. You should start using OAuth2 to be able to keep using the API in 2014.

If you really want to use your generated AuthToken, the request look ok. Can you clarify what do you put into:

  "clientCustomerId"=> '[CustomerIds same as SOAP]'?

Only one CID is supported per call.


-Danial, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages