Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6474677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:36:57+00:00 2026-05-25T06:36:57+00:00

Using the latest PHP CLient Library (v2.6.3) I can’t seem to figure out to

  • 0

Using the latest PHP CLient Library (v2.6.3) I can’t seem to figure out to get all campaigns for a client in my MCC (my client center) account.

I can easily get all accounts via:

$user = new AdWordsUser(NULL, $email, $password, $devToken, $applicationToken, $userAgent, NULL, $settingsFile);

$service = $user->GetServicedAccountService();
$selector = new ServicedAccountSelector();
$selector->enablePaging = false;

$graph = $service->get($selector);
$accounts = $graph->accounts; // all accounts!

Now that I’ve done that, I want to get all the campaigns within each account. Running the code as documented here doesn’t work.

// Get the CampaignService.
// ** Different than example because example calls a private method ** //
$campaignService = $user->GetCampaignService('v201101');

// Create selector.
$selector = new Selector();
$selector->fields = array('Id', 'Name');
$selector->ordering = array(new OrderBy('Name', 'ASCENDING'));

// Get all campaigns.
$page = $campaignService->get($selector);

// Display campaigns.
if (isset($page->entries)) {
    foreach ($page->entries as $campaign) {
        print 'Campaign with name "' . $campaign->name . '" and id "'
            . $campaign->id . "\" was found.\n";
    }
}

All the above code will do is throw an error:

Fatal error: Uncaught SoapFault exception: [soap:Server]
QuotaCheckError.INVALID_TOKEN_HEADER @ message=null
stack=com.google.ads.api.authserver.common.AuthException at
com.go;

I have a feeling that the reason this fails is that GetCampaignService needs an account’s id…but I can’t figure out how to specify this id.

What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:36:58+00:00Added an answer on May 25, 2026 at 6:36 am

    The problem ended up being that I was given the wrong developerToken. I didn’t think INVALID_TOKEN_HEADER really meant what it said because SOME calls still worked with the faulty token. I don’t know why.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using latest PHP. I want to parse HTML page to get data.
I am setting up an uploader (using php) for my client where they can
I'm using XAMPP (latest version) on OS 10.6.2, that's bundled with PHP 5.3.0 I
Does anybody using latest enterprise library 4.1 in mono? I used mono migration analyzer
I'm using mod_security with the latest core rules. It triggers on all my pages
I'm using NetBeans 6.9.1 with the latest PHP plugins, but I'm learning to develop
I just copied all cakephp file to my localhost (I am using latest XAMPP),
I'm using PHP to generate an html email which sends my clients latest stats
I am using the latest Janrain openid library example and the discovery process seems
I have just finished my latest task of creating an RSS Feed using PHP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.