Google ADs API: Not getting campaigns list in response even after got status as OK

46 views
Skip to first unread message

shikha...@hiteshi.com

unread,
Jun 16, 2021, 2:07:07 AM6/16/21
to AdWords API and Google Ads API Forum

Hi Team,

We have created test creds on Google ADs platform. Generated developer token, OAuth client ID and secret, and refresh token. We have created one campaign in the test account.

Now, we are trying to call Google ADs API's getCampaign() API with test creds (using clientID and client secret). In response we are getting status as OK, but no campaign related details are getting returned. Below is the request and response string:

Request

MethodName: google.ads.googleads.v7.services.GoogleAdsService/SearchStream Endpoint: googleads.googleapis.com:443 Headers: {developer-token=REDACTED, x-goog-api-client=gl-java/15.0.2 gapic/ gax/1.63.0 grpc/1.36.0} Body: customer_id: "6377058490" query: "SELECT campaign.id, campaign.name FROM campaign ORDER BY campaign.id"

Response:

Headers: Metadata(content-type=application/grpc,request-id=sNH3h8fggnVsl1okVEEl-g,date=Tue, 15 Jun 2021 08:00:45 GMT,alt-svc=h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43") Body: null Failure message: null Status: Status{code=OK, description=null, cause=null}.

Please let me know if anything else is required.

Thanks for your help in advance.

Google Ads API Forum Advisor

unread,
Jun 17, 2021, 1:27:58 AM6/17/21
to shikha...@hiteshi.com, adwor...@googlegroups.com
Hi Shikha,

Thank you for posting your concern.

I would like to inform you first that I am going to delete your initial post as it contains generated logs on your end.

Moving forward, please note that the report types with metrics such as the campaign report can only be requested against client account. However, the customer ID that you've set in the customer_id field is for manager account and this is possible reason why you are getting an empty result. With this, I would suggest replacing it with the customer ID of the client account where campaign is created.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Iw657:ref

Shikha Arzare

unread,
Jun 17, 2021, 1:51:56 AM6/17/21
to ads...@forumsupport.google, adwor...@googlegroups.com
Thanks for responding.

The previous email was having request and response data for test creds, so does this also should be confidential?

I tried with that (customer ID of the client account) as well, but bad luck. 

Please suggest.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/8USjy000000000000000000000000000000000000000000000QUTZ6200rIyaCTJwSxyRVs4NOSps5Q%40sfdc.net.
Reply all
Reply to author
Forward
0 new messages