was using too old of a version of 201109 - updated to the
2012.jan.something release and it works now.


On Feb 9, 10:49 pm, iateadonut <orienta....@gmail.com> wrote:
> This no longer works and I'm getting a
> QuotaCheckError.INVALID_TOKEN_HEADER error.
>
> I understand this has something to do with the developerToken, but my
> auth.ini file looks like this:
>
> email = "*...@gmail.com"
> password = "**"
> userAgent = "Test App"
> developerToken = "*****"
>
> So I thought that the developer token was assigned to $user in the
> script at:
>   $user = new AdWordsUser();  //by default here
>                 $user->GetAuthToken();
>
> and then passed here:
> ReportUtils::DownloadReport($reportDefinition, $path, $user,
> $options);
>
> I even tried things like $user->setDeveloperToken($token) in the
> script, just to try.  (This did not give me an error, incidentally,
> but, then I'm not sure how to display errors in $user objects.)
>
> Anyway, This doesn't work.  Can you give me a clue how this is
> supposed to work?
>
> On Dec 16 2011, 5:57 pm, iateadonut <orienta....@gmail.com> wrote:
>
>
>
>
>
>
>
> > OK,
>
> > changed:
> >   $user = new AdWordsUser();
>
> > to:
> >   $user = new AdWordsUser();
> >                 $user->GetAuthToken();
>
> > and i was able to run it three times without a captcha, so that seemed
> > to do it... not to mention it runs faster now.
>
> > thank you all for your help, Kevin, Anash, Eric
>
> > on a side note, debugging was a lot easier with CrossClients.  if you
> > have a single report to download, then you can just check the latest
> > date in the mysql table you import it into and know that the whole
> > process went fine.
>
> > now you have to check for all of your clients, but if one of the
> > reports is empty, then it's harder to know if you're missing just a
> > little bit of the data or there was no data in a report, etc.
>
> > On Dec 16, 2:18 pm, Kevin Winter <kevin.win...@google.com> wrote:
>
> > > Hi,
> > >   In the PHP library, the tokens are generated in a lazy fashion, i.e.
> > > right before they are needed.  If you don't cause the AuthToken to get
> > > generated BEFORE the fork, then each forked process will generate its own,
> > > leading to CAPTCHA challenged.  You can call GetAuthToken() 
> > > (http://code.google.com/p/google-api-adwords-php/source/browse/trunk/s...)
> > > on the AdWordsUser which forces creation.  Do this prior to the fork and
> > > each process will have a complete copy of the AdWordsUser object, 
> > > AuthToken
> > > and all, which can then be used to make requests without fear of CAPTCHA
> > > challenges.
>
> > > - Kevin Winter
> > > AdWords API Team
>
> > > On Friday, December 16, 2011 1:42:57 PM UTC-5,iateadonutwrote:
>
> > > > I'm misunderstanding:
>
> > > > I do this command only once:
> > > > $user = new AdWordsUser();
>
> > > > and then I loop through my customerId's like this:
> > > > $user->SetClientId($customerId);
>
> > > > I thought only 'new AdWordsUser()' would generate a new AuthToken?

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to