No Campaigns being returned by API

540 views
Skip to first unread message

ma...@clickedon.it

unread,
Aug 26, 2014, 12:43:58 PM8/26/14
to adwor...@googlegroups.com
I am having some issues with no campaigns coming back.
I am requesting from my sandbox account. However, it won't return any campaigns from either my main account or my test.
I have campaigns in both. Here is what I am doing. 

clientCustomerId - My test account
developerToken - My main account

Sadly, this all worked about 6 weeks ago. Any advice would be appreciated.
Thanks


Account account = mutationRequest.getAccount();
// Get the CampaignService.
CampaignServiceInterface campaignService = getAdWordsService(account.getId(), CampaignServiceInterface.class);

int offset = 0;

String query = "SELECT Id, Name, Status";

CampaignPage page = null;
do {

String pageQuery = query + String.format(" LIMIT %d, %d", offset, PAGE_SIZE);
// Get all campaigns.
page = campaignService.query(pageQuery);

// Display campaigns.
if (page.getEntries() != null) {
for (Campaign googleCampaign : page.getEntries()) {
resolveConflicts(campaigns, account, googleCampaign);
}
}

offset += PAGE_SIZE;
} while (offset < page.getTotalNumEntries());


REQUEST:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>
        <ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201402" soapenv:mustUnderstand="0">
            <ns1:clientCustomerId>434-xx-xx24</ns1:clientCustomerId>
            <ns1:developerToken>W8Rmxxxxx-xxxxxxxxRqn5A</ns1:developerToken>
            <ns1:userAgent>Cxxxxxxxt (AwApi-Java, AdWords-Axis/1.32.0, Common-Java/1.32.0, Axis/1.4, Java/1.8.0_11, maven)</ns1:userAgent>
            <ns1:validateOnly>false</ns1:validateOnly>
            <ns1:partialFailure>false</ns1:partialFailure>
        </ns1:RequestHeader>
    </soapenv:Header>
    <soapenv:Body>
            <query>SELECT Id, Name, Status LIMIT 0, 100</query>
        </query>
    </soapenv:Body>
</soapenv:Envelope>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
        <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201402">
            <requestId>0005018aeb6ad1100abf81d794009ffa</requestId>
            <serviceName>CampaignService</serviceName>
            <methodName>query</methodName>
            <operations>1</operations>
            <responseTime>365</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <queryResponse xmlns="https://adwords.google.com/api/adwords/cm/v201402">
            <rval>
                <totalNumEntries>0</totalNumEntries>
                <Page.Type>CampaignPage</Page.Type>
            </rval>
        </queryResponse>
    </soap:Body>
</soap:Envelope>

Stacie Waleyko

unread,
Aug 27, 2014, 9:46:33 AM8/27/14
to adwor...@googlegroups.com
Maybe the OAuth credentials are incorrect? Did you remember to update them when you started using the test account?

Josh Radcliff (AdWords API Team)

unread,
Aug 27, 2014, 10:12:16 AM8/27/14
to adwor...@googlegroups.com
Hi,

Also, is the clientCustomerId in your header the customer ID of your test MCC or your test AdWords account (child of your test MCC)? If it's set to your MCC, please change it to your AdWords account -- an MCC doesn't have any campaigns, so an empty response is expected if that's the clientCustomerId specified.

It sounds like your OAuth credentials at least match the clientCustomerId in your header, else you would be getting an auth error instead of an empty response. However, as Stacie recommended, if you change the clientCustomerId to a different account you'll want to make sure you're using OAuth credentials obtained while logged in as a user with access to that account.

Cheers,
Josh, AdWords API Team

Denny Crane

unread,
Jul 19, 2016, 6:14:39 PM7/19/16
to AdWords API Forum
So I'm actually having this same issue. Here is how I'm set up:

--MCC
  -- test manager account
    -- test adwords account
      -- test campaign

I'm using the MCC developer token (does not have production access) and the clientCustomerId for the test adwords account. I'm not getting any auth errors, only an empty result. Any ideas? 

Anthony Madrigal

unread,
Jul 19, 2016, 8:16:01 PM7/19/16
to AdWords API Forum
Hi Denny,

Since this is an old thread, could you please create a new one so that we can respond on there?

Thanks,
Anthony
AdWords API Team
Reply all
Reply to author
Forward
0 new messages