Error trying to download report

145 views
Skip to first unread message

Doğan Hekimoğlu

unread,
Jul 16, 2019, 2:44:33 AM7/16/19
to AdWords API and Google Ads API Forum
Even though I create a session with refresh token and client customer id whenever i try to fetch some reports i get the error: "Missing client information, Type: ReportDownloadError.INVALID_PARAMETER". I can do other operations successfully like getting audiencelists, adding removing user lists to audience lists etc. I really don't know what is the missing piece in the code. What does it mean by 'client information'. Any help would be greatly appreciated. Thank you in advance.

Google Ads API Forum Advisor Prod

unread,
Jul 16, 2019, 4:22:53 AM7/16/19
to adwor...@googlegroups.com
Hi,

Regarding the "Missing client information, Type: ReportDownloadError.INVALID_PARAMETER" error, could you confirm if the OAuth token(s) that you are using indeed belongs or is associated to the clientCustomerId in your request? I asked because this issue usually occurs when there is an issue with the client information passed in the request header

If the issue persists, could you send to me the SOAP logs and the email address you used to generate your OAuth credentials and tokens so I can verify if the email indeed has access to the account specified in your request?

You may reply using the Reply privately to author option when sending the requested information

Thanks and regards,
Peter
Google Ads API Team

ref:_00D1U1174p._5001U8LUsA:ref

Doğan Hekimoğlu

unread,
Jul 16, 2019, 4:44:30 AM7/16/19
to AdWords API and Google Ads API Forum
Hello, client customer id is 9660079934 and email is doganheki...@gmail.com but as i said before i can do other api calls like fetching and modifying audience lists. Also i don't have access to request headers as i use google ads library for java. I'm not making a manual post request.

Doğan Hekimoğlu

unread,
Jul 17, 2019, 5:55:21 AM7/17/19
to AdWords API and Google Ads API Forum
Hello again, are there any updates? I need this issue resolved ASAP. Thank you


On Tuesday, July 16, 2019 at 11:22:53 AM UTC+3, adsapiforumadvisor wrote:

Google Ads API Forum Advisor Prod

unread,
Jul 17, 2019, 6:13:32 AM7/17/19
to adwor...@googlegroups.com
Hi Doğan,

I have sent my response privately, could you check? If you are unable to locate my response, you may refer below for its contents :

"Thank you for sharing your clientCustomerId and your email address. Upon checking, the (966-XXX-XXX) account ID that you are using in your report request belongs to a MCC account. AdWords API reports are generated per client account only, and that said, could you confirm if the same issue is encountered if you use the account ID of one of the said (966-XXX-XXX) MCC's client accounts as the clientCustomerId?

Also if the issue persists and so that I can dig a bit deeper into the issue, could you send to me your complete report definition and the (updated) logs generated when the error occurred?"


Best regards,
Peter
Google Ads API Team

ref:_00D1U1174p._5001U8LUsA:ref

Doğan Hekimoğlu

unread,
Jul 17, 2019, 6:28:01 AM7/17/19
to AdWords API and Google Ads API Forum
Hi, I've tried for all of the customer client ids including the main ads account of the mentioned google ads account but still getting the same error. Also, I've tried to create the adwords session without providing any clientcustomerid since you said "AdWords API reports are generated per client account only" but still getting the same error what should i do exactly? 
Here are the steps i do:
1-grantOfflineAccess to users google account and receive an auth code.
2-Exchange auth code with refresh token
3-Authenticate with refresh token
4-Create session and "set clientcustomerid for the account i want the report of"
5-Try to download report

For the 4th step what should i change? I shouldn't provide clientcustomerid and provide something else? I tried everything to my knowledge but still getting the same error.

Btw, how do i check my private messages i couldn't find yours.

Thank you.

Google Ads API Forum Advisor Prod

unread,
Jul 18, 2019, 2:37:29 AM7/18/19
to adwor...@googlegroups.com
Hi Doğan,

My apologies for the back and forth and thank you for detailing your process. However, I have a few other questions to ask so I can better identify the cause of the issue :

1. Could you confirm if you have completely followed the steps mentioned in our OAuth2 credentials guide, specifically when generating the refreshToken?

2. Could you confirm if you are using any of the AdWords API's client libraries when sending your request? I asked this because if you are generating the request manually, some information may not have been passed correctly in your request header.

3. Could you provide the complete logs that were generated when the error occurred?

You may send your reply again privately. As for my private responses, it should be sent directly to your personal email or the one you specified in the thread/forum.

Thanks and regards,

Peter
Google Ads API Team

ref:_00D1U1174p._5001U8LUsA:ref

Doğan Hekimoğlu

unread,
Jul 18, 2019, 3:08:02 AM7/18/19
to AdWords API and Google Ads API Forum
Hi,

1. Yes, I think i've been doing everything correctly to generate refresh token

2. Yes, I've been using java client library for making api requests. To make it easier i'll share some code about how i generate refresh token

Client Side Javascript Code(For authorizing on behalf of the user)

gapi.auth2.getAuthInstance().grantOfflineAccess().then(function(resp) {
      //pass resp.code to my servlet
}

Server Side Java

GoogleAuthorizationCodeFlow authorizationFlow = new GoogleAuthorizationCodeFlow.Builder(
        new NetHttpTransport(),
        new JacksonFactory(),
        CLIENT_ID,
        CLIENT_SECRET,
        Arrays.asList(SCOPE))
        .setAccessType("offline").build();

                //Request token with offline access code
GoogleAuthorizationCodeTokenRequest tokenRequest = authorizationFlow.newTokenRequest(offlineAccessCode);
    tokenRequest.setRedirectUri(CALLBACK_URL);
    GoogleTokenResponse tokenResponse = tokenRequest.execute();

    String refreshToken = tokenResponse.getRefreshToken();

3. Here are java logs that are generated when the report downloading error occurs

HTTP Response Code: 400, Trigger: Missing client information, Type: ReportDownloadError.INVALID_PARAMETER
at com.google.api.ads.adwords.lib.utils.v201809.DetailedReportDownloadResponseException$Builder.build(DetailedReportDownloadResponseException.java:35)
at com.google.api.ads.adwords.lib.utils.AdHocReportDownloadHelperImpl.handleResponse(AdHocReportDownloadHelperImpl.java:117)
at com.google.api.ads.adwords.lib.utils.AdHocReportDownloadHelperImpl.downloadReport(AdHocReportDownloadHelperImpl.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.api.ads.common.lib.utils.AdsUtilityInvocationHandler.handleInvocation(AdsUtilityInvocationHandler.java:46)
at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:84)
at com.sun.proxy.$Proxy50.downloadReport(Unknown Source)
at com.google.api.ads.adwords.lib.utils.AdHocReportDownloadHelper.downloadReport(AdHocReportDownloadHelper.java:46)
at com.google.api.ads.adwords.lib.utils.v201809.ReportDownloader.downloadReport(ReportDownloader.java:65)
at google.retargeting.util.GoogleAds.getReport(GoogleAds.java:122)
at google.retargeting.servlet.GoogleApiServlet.doGet(GoogleApiServlet.java:63)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)

 Thank you

Google Ads API Forum Advisor Prod

unread,
Jul 18, 2019, 11:28:39 PM7/18/19
to adwor...@googlegroups.com
Hi Doğan,

Thank you for sharing your code and some information about your implementation. Seeing that how you construct the credentials and sessions objects are a bit different from the standard in the client library examples, could you share your full code as well so I can look into the issue a bit closer?

You may send the details using the Reply privately to author option.

Doğan Hekimoğlu

unread,
Jul 23, 2019, 3:22:06 AM7/23/19
to AdWords API and Google Ads API Forum
Hi, I've sent you full code privately. Are there any updates on the issue? Thank you

abdullah qasrawi

unread,
Jul 23, 2019, 6:48:07 AM7/23/19
to doganheki...@gmail.com, AdWords API and Google Ads API Forum
Thanks for your quick response
Kindly find the code attached

Best Regards
Abdullah

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/0fe07fe7-37c0-4971-b0d7-c7bb62b6012f%40googlegroups.com.


--

Eng. Abdullah Qasrawi | GeoMOLG Officer (Administrator)

 

Ministry of Local Government   وزارة الحكم المحلي

Five Brothers Building (Near Al Huda Gas Station)   (عمارة "فايف بروذرز" (بالقرب من محطة الهدى
Makka St | Al Balou | Al Bireh | Ramallah | West Bank | Palestine   شارع مكة | البالوع | البيرة | رام الله | الضفة الغربية | فلسطين
P.O.Box: Ramallah, 731

Find us on the map: http://www.w3w.co/things.play.calculate

GeoMOLG (Palestine SDI): http://geomolg.ps/

 

T: +972 (0)2 2423581 | Fax: +972 (0)2 297 48 04 |Sitehttp://www.molg.pna.ps

M: +97(0)595658077 | e-mail:  Abdu...@molg.pna.ps
Skype:  abdullah....@gmail.com     Facebook: Abdullah Qasrawi

 
https://www.linkedin.com/company/geomolg?trk=nav_account_sub_nav_company_admin
https://twitter.com/GeoMOLG_Pal
GoogleMaps.html

Google Ads API Forum Advisor Prod

unread,
Jul 24, 2019, 7:54:31 AM7/24/19
to abdullah....@gmail.com, doganheki...@gmail.com, adwor...@googlegroups.com
Hello,

I apologize; it appears that my response was lost. I've reproduced it below:

It appears that the RAR file you attached is corrupt. Can you try repackaging it?

Additionally, can you describe more about what you mean by "client side" and "server side" in the example code you provided previously? Every API consumer has its own unique architecture, and from my perspective they're all clients, so I don't fully understand the relationship in your specific context.

Regards,
Mike, Google Ads API Team

ref:_00D1U1174p._5001U8LUsA:ref

Doğan Hekimoğlu

unread,
Jul 24, 2019, 9:10:21 AM7/24/19
to AdWords API and Google Ads API Forum
Hello, i've sent you the files again via private message. Client side means the web application and server side means the backend that feeds the web application. Simple as that. Other than that i've tried the same flow in nodejs with an unofficial google ads package and i had no problem fetching the reports. So, im sure there is no missing arguments on my googleads flow but you can check it out on the code i provided through private message. I really need a definitive solution to this problem. Thank you.

Doğan Hekimoğlu

unread,
Jul 24, 2019, 9:15:58 AM7/24/19
to AdWords API and Google Ads API Forum
By the way can you remove the troll that is abdullah qasrawi from the topic. I keep receiving weird messages from that account

Google Ads API Forum Advisor Prod

unread,
Jul 24, 2019, 9:30:46 AM7/24/19
to doganheki...@gmail.com, adwor...@googlegroups.com
Hello,

That rar is also unopenable. However, I don't think that the source code is going to shine as much light onto what's going on here as seeing the actual request that you're sending. The Java client library has an article on logging here: https://github.com/googleads/googleads-java-lib/wiki/Logging

You really need to extract the actual request that you're sending to the server so that we can see how it's formatted, and how that formatting compares to a successful request, to identify what the difference is. There is a section in the linked article specifically about logging reporting requests, which should help find this information.

Once you have a sample request that is failing, I can take a close look to hopefully identify the issue.


Regards,
Mike, Google Ads API Team

ref:_00D1U1174p._5001U8LUsA:ref
Reply all
Reply to author
Forward
0 new messages