GetCampaigns.java - No campaigns were found.

53 views
Skip to first unread message

bols...@smm.ru.com

unread,
Oct 31, 2018, 7:16:05 PM10/31/18
to AdWords API and Google Ads API Forum
Hello!
There is a primary account for working with google ads (503-425-5686).
For this account (503-425-5686) a developer account has been created.

After that, a test account was created (397-761-8798)
Further, the settings file looks like this:
api.adwords.refreshToken=Was created for an account (397-761-8798)
api.adwords.clientId=Was created for an account (503-425-5686)
api.adwords.clientSecret=Was created for an account (503-425-5686)
api.adwords.clientCustomerId=397-761-8798
api.adwords.developerToken=Was created for an account (503-425-5686)

Next, I make a request GetCampaigns.java and get in response:
"[31 Oct 2018 11:23:22,552-requestInfoLogger:INFO:main] Request made: Service: CampaignService Method: get clientCustomerId: 397-761-8798 URL: https://adwords.google.com/api/adwords/cm/v201809/CampaignService Request ID: 0005797ea9a00cc00ae9eb129702a061 ResponseTime(ms): 168 OperationsCount: 1 IsFault: false FaultMessage: null
No campaigns were found. "

If I make an AddCampaigns.java request, the answer comes in: (Look in - Remove AddCampaigns.java - Error log.txt)

I hope for your help!
screenshot.png
AddCampaigns.java - Error log.txt

Teja Makani

unread,
Nov 1, 2018, 12:34:48 PM11/1/18
to AdWords API and Google Ads API Forum
Hello Alex,

The ADD_OPERATION_NOT_PERMITTED error occurs usually when you are attempting to add a campaign to a manager account. Looks like the client customer Id pointing in the call is a test manager account, as campaign can't be created in a manager account the request failed. Please give it a try with test account and let me know if you are still facing issues.

One more observation is that the refresh token, clientId and clientSecret must belongs to the same user having access to the Google Ads account you are pointing in the request. You could refer this guide to create OAuth2 credentials. You can use the existing developer token as the developer token can be used against any Google Ads account. 

We are running an annual developer feedback survey. Please take opportunity to leave feedback on how we can make managing campaigns at scale even easier.

Regards,
Sai Teja, AdWords API Team.

bols...@smm.ru.com

unread,
Nov 1, 2018, 9:55:46 PM11/1/18
to AdWords API and Google Ads API Forum
Hello Teja!
Can I provide some more information for you so that you can give a more accurate answer?

For example, here is a screenshot of the web interface.
screenshot_1.png
screenshot_2.png
screenshot_3.png

Teja Makani

unread,
Nov 2, 2018, 2:40:45 PM11/2/18
to AdWords API and Google Ads API Forum
Hello Alex,

Did you try to change the clientCustomerId in your API call to test account instead of manager test account? Please give it a try, if you are still facing any errors then share the entire SOAP logs(request and response) without redacting any information. In the U the manager account may show-up the campaigns however, via API, you will need to use the client account that owns the campaign in the ClientCustomerId header field. You could refer this README.md file to enable logging for Java client libraries, you could refer here for other languages. You could use reply privately to author option while sharing the details requested.


Regards,
Sai Teja, AdWords API Team.

On Wednesday, October 31, 2018 at 7:16:05 PM UTC-4, bols...@smm.ru.com wrote:
Reply all
Reply to author
Forward
0 new messages