QuotaCheckError.INVALID_TOKEN_HEADER @ ; trigger:'<null>'???

2,917 views
Skip to first unread message

Sunil

unread,
Jan 18, 2012, 10:35:51 AM1/18/12
to AdWords API Forum
Hello,

Since this morning, I've been receiving the error: Report contents are
invalid. - !!!2|||15432193|||QuotaCheckError.INVALID_TOKEN_HEADER @ ;
trigger:'<null>'???

What could be the reason?

I'm using v201109. I'm using the DownloadClientReport to download
client data.

Is there a number I can contact regarding this issue?

Thanks

Sunil

sms_adwords

unread,
Jan 18, 2012, 10:46:48 AM1/18/12
to adwor...@googlegroups.com
FWIW, I'm also seeing this (thought intermittently) as of this morning in v201101.


Sunil

unread,
Jan 18, 2012, 12:03:27 PM1/18/12
to AdWords API Forum
I am connecting to the live API server. The strange part is 90% of my
reports get downloaded successfully. However, on 10% of the reports, I
get an
QuotaCheckError.INVALID_TOKEN_HEADER error. Nothing changed in my
code over the last several weeks. Why am I getting this error today?

Alexander Parij

unread,
Jan 18, 2012, 12:19:12 PM1/18/12
to adwor...@googlegroups.com
I suspect there was a server update yesterday related to dev_token headers :

Most likely something else got broken during this update. Anyways a quick fix would be a retry mechanism, it works for us

Alex

Sunil

unread,
Jan 18, 2012, 12:32:28 PM1/18/12
to AdWords API Forum
I am already sending the developer token. I am able to download 90% of
reports. But, I get an QuotaCheckError.INVALID_TOKEN_HEADER error on
the 10% reports.

On Jan 18, 11:19 am, Alexander Parij <paris.a...@gmail.com> wrote:
> I suspect there was a server update yesterday related to dev_token headers :http://adwordsapi.blogspot.com/2011/11/update2-developer-token-requir...

rohit

unread,
Jan 18, 2012, 1:31:14 PM1/18/12
to AdWords API Forum
We are seeing this too using the Ruby client library. Same symptoms,
fails intermittently after downloading successfully from several
accounts.

Sunil

unread,
Jan 18, 2012, 4:46:43 PM1/18/12
to AdWords API Forum
Now I am unable to download report even for a single account....

Alexander Parij

unread,
Jan 18, 2012, 5:13:18 PM1/18/12
to adwor...@googlegroups.com
Yes , if before it could be solved by just re-trying now it's all gone nothing works at all.

stepanian

unread,
Jan 18, 2012, 5:36:56 PM1/18/12
to AdWords API Forum
Any update on this from Google? I am having the same exact problem.

Eric Koleda

unread,
Jan 18, 2012, 6:21:22 PM1/18/12
to adwor...@googlegroups.com
Hi All,

As per the blog post Alexander linked to (http://adwordsapi.blogspot.com/2011/11/update2-developer-token-required-in.html) developer tokens are now required for all report download requests.  If you believe you are passing your developer token correctly please let us know what client library and version you are using and/or post a sanitized copy of your HTTP request.

Best,
- Eric Koleda, AdWords API Team

Alexander Parij

unread,
Jan 18, 2012, 6:24:12 PM1/18/12
to adwor...@googlegroups.com
It's definitely  developerToken related and they mention in this blog post 

"If your application fails to provide the developer token as an HTTP header after November 23rd, 
it will receive the error message QuotaCheckError.INVALID_TOKEN_HEADER when downloading reports. "

I wonder if google  requires a different soap namespace ?

Sunil

unread,
Jan 18, 2012, 6:28:43 PM1/18/12
to AdWords API Forum
I am using AdwordsApi v201109 with .Net.

On Jan 18, 5:21 pm, Eric Koleda <eric.kol...@google.com> wrote:
> Hi All,
>
> As per the blog post Alexander linked to (http://adwordsapi.blogspot.com/2011/11/update2-developer-token-requir...)

Alexander Parij

unread,
Jan 18, 2012, 6:30:22 PM1/18/12
to adwor...@googlegroups.com
Eric, I'm using python library 14.2.3

*** Outgoing SOAP ******************************************************
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Header>
<authToken>xxxxxx</authToken>
<userAgent>AwApi-Python-14.2.3|Test Client</userAgent>
<clientCustomerId>XXXX</clientCustomerId>
<developerToken>XXX</developerToken>
</RequestHeader>
</SOAP-ENV:Header>
<ns1:operations>
<ns1:operator>ADD</ns1:operator>
<ns1:operand>
<ns1:selector>
<ns1:fields>Date</ns1:fields>
<ns1:fields>KeywordText</ns1:fields>
<ns1:fields>KeywordMatchType</ns1:fields>
<ns1:fields>QualityScore</ns1:fields>
<ns1:fields>Impressions</ns1:fields>
<ns1:fields>Clicks</ns1:fields>
<ns1:fields>Cost</ns1:fields>
<ns1:fields>Conversions</ns1:fields>
<ns1:predicates>
<ns1:field>CampaignStatus</ns1:field>
<ns1:operator>EQUALS</ns1:operator>
<ns1:values>ACTIVE</ns1:values>
</ns1:predicates>
<ns1:predicates>
<ns1:field>AdGroupStatus</ns1:field>
<ns1:operator>EQUALS</ns1:operator>
<ns1:values>ENABLED</ns1:values>
</ns1:predicates>
<ns1:predicates>
<ns1:field>Status</ns1:field>
<ns1:operator>EQUALS</ns1:operator>
<ns1:values>ACTIVE</ns1:values>
</ns1:predicates>
<ns1:predicates>
<ns1:field>AdNetworkType1</ns1:field>
<ns1:operator>EQUALS</ns1:operator>
<ns1:values>SEARCH</ns1:values>
</ns1:predicates>
<ns1:predicates>
<ns1:field>IsNegative</ns1:field>
<ns1:operator>EQUALS</ns1:operator>
<ns1:values>FALSE</ns1:values>
</ns1:predicates>
<ns1:dateRange>
<ns1:min>20111020</ns1:min>
<ns1:max>20120118</ns1:max>
</ns1:dateRange>
</ns1:selector>
<ns1:reportName>keyword performance report</ns1:reportName>
<ns1:reportType>KEYWORDS_PERFORMANCE_REPORT</ns1:reportType>
<ns1:dateRangeType>CUSTOM_DATE</ns1:dateRangeType>
<ns1:downloadFormat>GZIPPED_CSV</ns1:downloadFormat>
</ns1:operand>
</ns1:operations>
<ns1:operations>
<ns1:operator>ADD</ns1:operator>
<ns1:operand>
<ns1:selector>
<ns1:fields>Date</ns1:fields>
<ns1:fields>Query</ns1:fields>
<ns1:fields>MatchType</ns1:fields>
<ns1:fields>Impressions</ns1:fields>
<ns1:fields>Clicks</ns1:fields>
<ns1:fields>Cost</ns1:fields>
<ns1:fields>Conversions</ns1:fields>
<ns1:predicates>
<ns1:field>CampaignStatus</ns1:field>
<ns1:operator>EQUALS</ns1:operator>
<ns1:values>ACTIVE</ns1:values>
</ns1:predicates>
<ns1:predicates>
<ns1:field>AdGroupStatus</ns1:field>
<ns1:operator>EQUALS</ns1:operator>
<ns1:values>ENABLED</ns1:values>
</ns1:predicates>
<ns1:predicates>
<ns1:field>AdNetworkType1</ns1:field>
<ns1:operator>EQUALS</ns1:operator>
<ns1:values>SEARCH</ns1:values>
</ns1:predicates>
<ns1:dateRange>
<ns1:min>20111020</ns1:min>
<ns1:max>20120118</ns1:max>
</ns1:dateRange>
</ns1:selector>
<ns1:reportName>search query performance report</ns1:reportName>
<ns1:reportType>SEARCH_QUERY_PERFORMANCE_REPORT</ns1:reportType>
<ns1:dateRangeType>CUSTOM_DATE</ns1:dateRangeType>
<ns1:downloadFormat>GZIPPED_CSV</ns1:downloadFormat>
</ns1:operand>
</ns1:operations>
</ns1:mutate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
************************************************************************





Eric Koleda

unread,
Jan 18, 2012, 6:39:20 PM1/18/12
to adwor...@googlegroups.com
Hi Alexander,

The client library didn't start sending the developer token in the request until 15.0.4:


For everyone else, please ensure you are using the latest version of the client library.

Best,
- Eric

stepanian

unread,
Jan 18, 2012, 6:42:08 PM1/18/12
to AdWords API Forum
I am using the latest dotnet library (I just downloaded it) and it's
still giving me the same error. I am adding the developer token
header.

On Jan 18, 3:39 pm, Eric Koleda <eric.kol...@google.com> wrote:
> Hi Alexander,
>
> The client library didn't start sending the developer token in the request
> until 15.0.4:
>
> http://code.google.com/p/google-api-ads-python/source/browse/trunk/ad...

stepanian

unread,
Jan 18, 2012, 6:44:36 PM1/18/12
to AdWords API Forum
Never mind. It worked! I was adding it only to the report definition
not the URL request. Thanks.

Alexander Parij

unread,
Jan 18, 2012, 6:46:49 PM1/18/12
to adwor...@googlegroups.com
Eric as you can see in the outgoing soap
I do send  developerToken with v14

Sunil

unread,
Jan 18, 2012, 7:14:35 PM1/18/12
to AdWords API Forum
Stepanian,

How are you adding the developer token to the URL request? I am also
using .Net library

Sunil

unread,
Jan 18, 2012, 7:23:49 PM1/18/12
to AdWords API Forum
Guys,

I need some assistance.

I am using the DownloadClientReport() method to download the
ClientReports in .net :
new ReportUtilities(user).DownloadClientReport(reportDefinitionId,
false, filePath);

I created the user object by: AdWordsUser user =
SSAdWordsUser.CreateAdWordUser(account.GoogleId, token);

public static AdWordsUser CreateAdWordUser(string customerId, string
token)
{
//Create a new AdWordsAppConfig object - part of the API
AdWordsAppConfig config = new AdWordsAppConfig();

//Create a Dictionary object which is what is passed to
the AdWordUser object
Dictionary<string, string> headers = new
Dictionary<string, string>();

//Get the values from the configuration file
headers.Add("userAgent", config.UserAgent);
headers.Add("email", config.Email);
headers.Add("password", config.Password);
headers.Add("developerToken", config.DeveloperToken);
headers.Add("clientCustomerId", customerId);
headers.Add("authToken", token);

//Add the Dictionary object to and create a new AdWordUser
object
return new AdWordsUser(headers);
}

Where else am I supposed to add the developer token?

stepanian

unread,
Jan 18, 2012, 7:30:03 PM1/18/12
to AdWords API Forum
You need to do two things:

1) Make sure you are using the latest dotnet client library.
2) Add the developer token to both the report definition mutate
operation and also to the report download operation.

For the report download, I use the following code:

string gZipPath = "path_to_gzip";
WebClient wc = new WebClient();
String url = "https://adwords.google.com/api/adwords/reportdownload?
__rd=" + id;
wc.Headers.Add("Authorization", "GoogleLogin auth=" +
service.RequestHeader.authToken);
wc.Headers.Add("clientEmail", service.RequestHeader.clientEmail);
wc.Headers.Add("developerToken",
"your_developer_token");
wc.DownloadFile(url, gZipPath);

Sunil

unread,
Jan 18, 2012, 7:51:19 PM1/18/12
to AdWords API Forum
Thanks Stepanian.

Could you please tell me what's wrong with my code that I pasted
above?

Alexander Parij

unread,
Jan 18, 2012, 8:09:07 PM1/18/12
to adwor...@googlegroups.com
Eric , this is something that you should communicate before ....  not after everything brakes down .
Anyways upgrading to v15 is out of the question until we properly test it.
I had to patch v14.2.3 to add developerToken header in this particular call to download the report

for anyone in the same situation , in ReportDefiniationService.py
def __GenerateHeaders(self, return_micros):

add 
headers['developerToken'] = 'YOUR TOKEN' 

and also patch the SanityCheck so it won't complain about the extra field.

It's a quick hack to those who have production systems down.

Alexander Parij.


Sunil

unread,
Jan 18, 2012, 9:05:33 PM1/18/12
to AdWords API Forum
Eric,

I need your help with figuring out the issue I am having. Please

Sunil

Eric Koleda

unread,
Jan 19, 2012, 9:12:23 AM1/19/12
to adwor...@googlegroups.com
Hi Alexander,

We first communicated this change in November of last year, and then again about a week ago:


Sunil,

Please make sure you are using the latest version of the .NET client library, as older versions may not send the developer token along with report download requests.

Best,
- Eric

Sunil

unread,
Jan 19, 2012, 9:58:09 AM1/19/12
to AdWords API Forum
Eric,

I'm using the latest v201109 Adwords API. Is there something else I
should be using?

Sunil

On Jan 19, 8:12 am, Eric Koleda <eric.kol...@google.com> wrote:
> Hi Alexander,
>
> We first communicated this change in November of last year, and then again
> about a week ago:
>
> http://adwordsapi.blogspot.com/2011/11/update2-developer-token-requir...http://googleadsdeveloper.blogspot.com/2012/01/developer-token-requir...

opalepatrick

unread,
Jan 19, 2012, 10:30:46 AM1/19/12
to AdWords API Forum
Using php, I have always had the developers token in the auth.ini, so
why am I getting this message?

On Jan 19, 3:12 pm, Eric Koleda <eric.kol...@google.com> wrote:
> Hi Alexander,
>
> We first communicated this change in November of last year, and then again
> about a week ago:
>
> http://adwordsapi.blogspot.com/2011/11/update2-developer-token-requir...http://googleadsdeveloper.blogspot.com/2012/01/developer-token-requir...

Sunil

unread,
Jan 19, 2012, 10:32:46 AM1/19/12
to AdWords API Forum
Eric,

I am using the v200109 API. I am sending the developer token. What
else am I missing?

Is there an email address I can reach you at?

I am unable to download any client reports.

Sunil

On Jan 19, 8:58 am, Sunil <Su...@sweetspotmarketing.com> wrote:
> Eric,
>
> I'm using the latest v201109 Adwords API. Is there something else I
> should be using?
>
> Sunil
>
> On Jan 19, 8:12 am, Eric Koleda <eric.kol...@google.com> wrote:
>
>
>
> > Hi Alexander,
>
> > We first communicated this change in November of last year, and then again
> > about a week ago:
>
> >http://adwordsapi.blogspot.com/2011/11/update2-developer-token-requir......

opalepatrick

unread,
Jan 19, 2012, 10:57:35 AM1/19/12
to AdWords API Forum
OK, uploaded the 2.7.2 library and that solved the issue. But why did
I have to go through loads of stuff to find that out. Also, the idea
of using a blog of all things to announce important updates is just
daft. There has to be a better way. I just switch off with blog stuff
it just gets lumped into all the chatter and becomes part of the
drone. As someone else said, this sort of thing that can break scripts
needs to be flagged in a better way.

On Jan 19, 4:30 pm, opalepatrick <ad...@patpatworks.com> wrote:
> Using php, I have always had the developers token in the auth.ini, so
> why am I getting this message?
>
> On Jan 19, 3:12 pm, Eric Koleda <eric.kol...@google.com> wrote:
>
>
>
>
>
>
>
> > Hi Alexander,
>
> > We first communicated this change in November of last year, and then again
> > about a week ago:
>
> >http://adwordsapi.blogspot.com/2011/11/update2-developer-token-requir......

Sunil

unread,
Jan 19, 2012, 11:32:11 AM1/19/12
to AdWords API Forum
Hello,

I am now getting a QuotaCheckError.ACCOUNT_INACTIVE error. Could this
also be related to the developer token?

Sunil

Eric Koleda

unread,
Jan 19, 2012, 2:05:54 PM1/19/12
to adwor...@googlegroups.com
Hi opalepatrick,

We're open to suggestions on how best to communicate this information.

Sunil,

v201109 is the version of the API you are using, but the client library you are using must also be updated.

Best,
- Eric

Sunil

unread,
Jan 19, 2012, 2:14:40 PM1/19/12
to AdWords API Forum
So, is the QuotaCheckError.ACCOUNT_INACTIVE error anything to do with
the developer token?

Sunil

unread,
Jan 19, 2012, 2:26:52 PM1/19/12
to AdWords API Forum
I got the .Net library, made some code changes and when I tried to
download the reports, I got the QuotaCheckError.ACCOUNT_INACTIVE
error. Please help

Sunil

unread,
Jan 19, 2012, 3:22:10 PM1/19/12
to AdWords API Forum
Eric,

The request header has the following information:
{clientCustomerId: 7720483380
Content-Type: application/x-www-form-urlencoded
Authorization: GoogleLogin auth=<<sometext>>
returnMoneyInMicros: false
developerToken: <<developertoken>>

Please let me know whether the request header looks alright or not.

Sunil

Eric Koleda

unread,
Jan 19, 2012, 4:08:42 PM1/19/12
to adwor...@googlegroups.com
Hi Sunil,

This error indicates that the MCC account that owns your token is currently disabled.  Please log into the account to resolve this.

Best,
- Eric

Sunil

unread,
Jan 19, 2012, 5:22:39 PM1/19/12
to AdWords API Forum
So, Eric, does this mean that I am sending the developer token
successfully?

Peter S.

unread,
Jan 19, 2012, 9:54:13 PM1/19/12
to AdWords API Forum
I am using the .Net API and we weren't using the developer token even
though it should have been blocking us since November. I added it to
our headers and things are working again via the .Net API.

Eric Koleda

unread,
Jan 20, 2012, 9:55:11 AM1/20/12
to adwor...@googlegroups.com
HI Sunil,

Yes, I believe this indicates that you are sending it successful.

Best,
- Eric
Message has been deleted

Priya Gandhi

unread,
Oct 12, 2012, 5:26:43 PM10/12/12
to adwor...@googlegroups.com
Hi,

We are planning to implement Adwords API and currently the sandbox testing was successful. I got OAuth2ClientId and OAuth2ClientSecret for the localhost by following the steps given in the link http://code.google.com/p/google-api-adwords-dotnet/wiki/UsingOAuth and started testing Adwords.Examples.CSharp.OAuth code. In web.config file, I provided the following

<add key="AuthorizationMethod" value="ClientLogin"  />
<add key="Email" value="xxxxxxxxxxxxx"/>
<add key="Password" value="xxxxxxxxxxxxxx"/>


    <add key="AuthorizationMethod" value="OAuth2" />
    <add key="OAuth2ClientId" value="xxxxxxxxxxxxxxxxxxxx" />
    <add key="OAuth2ClientSecret" value="xxxxxxxxxxxxxxxxxxxxxxx" />


I am getting 'QuotaCheckError.INVALID_TOKEN_HEADER' when I try to get campaigns for our clientCustomerID 653-818-9526. Any help would be appreciated!

Danial Klimkin

unread,
Oct 16, 2012, 8:59:25 AM10/16/12
to adwor...@googlegroups.com
Hello Priya,


Are you trying to use the TargetingIdeaService by chance? This service will not provide meaningful results in the Sandbox and currently returns an error.


-Danial, AdWords API Team.

Priya Gandhi

unread,
Oct 16, 2012, 1:10:52 PM10/16/12
to danial.kli...@google.com, adwor...@googlegroups.com
Hi Danial,

I am trying to run the AdWords.Examples.CSharp.OAuth application from the downloaded code and clicked the GetCampaigns button by providing one of our customerID. I have ENABLED OAuth2  through my account and received OAuth2ClientId and OAuth2ClientSecret for localhost. I have given DeveloperToken, Email and Password in my Web.config file.  I still get the error. 

Can you advise me about the problem?

Thanks,
Priya


--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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



--
Thanks,
Priya

AdWordsAPIAdvisor

unread,
Oct 17, 2012, 6:01:07 AM10/17/12
to Priya Gandhi, adwor...@googlegroups.com
Hello Priya,


I'll ask my colleague who is the author of the CSharp libraries to look
into this issue for you.


-Danial.


Original Message Follows:
------------------------
From: Priya Gandhi <pga...@relevantads.com>
Subject: Re: QuotaCheckError.INVALID_TOKEN_HEADER @ ; trigger:'<null>'???
Date: Tue, 16 Oct 2012 10:10:52 -0700

> Hi Danial,
>
> I am trying to run the *AdWords.Examples.CSharp.OAuth* application from
http://code.google.com/p/**google-api-adwords-dotnet/**wiki/UsingOAuth<http://code.google.com/p/google-api-adwords-dotnet/wiki/UsingOAuth>
and
> >> started testing Adwords.Examples.CSharp.OAuth code. In web.config
file, I
> >> provided the following
> >>
> >> <add key="AuthorizationMethod" value="ClientLogin" />
> >> <add key="Email" value="xxxxxxxxxxxxx"/>
> >> <add key="Password" value="xxxxxxxxxxxxxx"/>
> >>
> >>
> >> <add key="AuthorizationMethod" value="OAuth2" />
> >> <add key="OAuth2ClientId" value="xxxxxxxxxxxxxxxxxxxx" />
> >> <add key="OAuth2ClientSecret" value="**xxxxxxxxxxxxxxxxxxxxxxx"
/>
> >>
> >>
> >> I am getting 'QuotaCheckError.INVALID_**TOKEN_HEADER' when I try to
get
> >> campaigns for our clientCustomerID 653-818-**9526. Any help would be

Sebastian

unread,
Oct 19, 2012, 9:14:55 AM10/19/12
to adwor...@googlegroups.com
Same problem here with the php 201209 lib.
using TargetingIdeaService in sandbox is returning QuotaCheckError.INVALID_TOKEN_HEADER.
We really need this solved as we cannot test / send to production our applications.

On Wednesday, January 18, 2012 4:35:51 PM UTC+1, Sunil wrote:
Hello,

Since this morning, I've been receiving the error: Report contents are
invalid. - !!!2|||15432193|||QuotaCheckError.INVALID_TOKEN_HEADER @ ;
trigger:'<null>'???

What could be the reason?

I'm using v201109. I'm using the DownloadClientReport to download
client data.

Is there a number I can contact regarding this issue?

Thanks

Sunil
Reply all
Reply to author
Forward
0 new messages