Hello Eric,
I am again facing this issue "!!!2|||-1|||<eye3-stackless title='AuthServer
User Error OAUTH_TOKEN_HEADER_INVALID'/>
AuthenticationError.OAUTH_TOKEN_HEADER_INVALID @ "
Please find the attached report.
XML Report is as below..
[Aug 27 2012 04:40:05.000000 - ERROR] POST
/api/adwords/reportdownload/v201109 HTTP/1.1
User-Agent: curl, gzip
Host: adwords.google.com
Accept: */*
Accept-Encoding: gzip
Authorization: OAuth oauth_version="1.0a",
oauth_nonce="dfd014ee2f50e3d6cd1f617844cc36ec",
oauth_timestamp="1346038802", oauth_consumer_key="consumer_key",
oauth_token="oauthtoken", oauth_signature_method="HMAC-SHA1",
oauth_signature="Oauth signature"
developerToken: token
clientCustomerId: 3341002143
returnMoneyInMicros: false
Content-Length: 1317
Expect: 100-continue
Content-Type: multipart/form-data;
boundary=----------------------------457169db54cc
Parameters:
__rdxml: <?xml version="1.0"?>
<reportDefinition>
<selector>
<fields>CampaignId</fields>
<fields>Impressions</fields>
<fields>Ctr</fields>
<fields>AverageCpc</fields>
<fields>AverageCpm</fields>
<fields>Cost</fields>
<fields>AveragePosition</fields>
<fields>Conversions</fields>
<fields>CostPerConversion</fields>
<fields>ConversionRate</fields>
<fields>ImpressionShare</fields>
<fields>ExactMatchImpressionShare</fields>
<fields>BudgetLostImpressionShare</fields>
<fields>CampaignName</fields>
<fields>Status</fields>
<fields>Clicks</fields>
<fields>AccountCurrencyCode</fields>
<fields>QualityLostImpressionShare</fields>
<fields>ViewThroughConversions</fields>
<predicates>
<field>Status</field>
<operator>IN</operator>
<values>ACTIVE</values>
<values>PAUSED</values>
</predicates>
</selector>
<reportName>weekly_campaign_report #1346038802</reportName>
<reportType>CAMPAIGN_PERFORMANCE_REPORT</reportType>
<dateRangeType>LAST_WEEK</dateRangeType>
<downloadFormat>CSV</downloadFormat>
<includeZeroImpressions>false</includeZeroImpressions>
</reportDefinition>
Response Code: 400
Error Message: <eye3-stackless title='AuthServer User Error
OAUTH_TOKEN_HEADER_INVALID'/>
AuthenticationError.OAUTH_TOKEN_HEADER_INVALID @ ; trigger:'<null>';
errorDetails:message=Invalid Header
On Monday, July 16, 2012 8:07:52 PM UTC+5:30, Eric Koleda wrote:
>
> Great, glad you got it working!
>
> - Eric
>
>
> On Sat, Jul 7, 2012 at 3:38 AM, Chirag <[email protected] <javascript:>
> > wrote:
>
>> Hi Eric,
>>
>> Yes, i am successfully able to use Report Download Request from command
>> line on both server.
>> When i set date_default_timezone_set('Asia/Calcutta'); That PHP warning
>> also gone.
>>
>> Please look at final result:
>>
>> OAuth authorization successful.
>> Report with name 'Criteria performance report #4ff7dd422ea1a' was
>> downloaded to '/var/www/html/cron/report_command_line.csv'.
>>
>> Thanks,
>> Chirag
>>
>>
>>
>> On Wednesday, June 13, 2012 12:15:31 AM UTC+5:30, Eric Koleda wrote:
>>>
>>> Hi Chirag,
>>>
>>> I would encourage you to set the timezone on that server in the php.ini
>>> file, to ensure the timestamps are accurate. Can you try replacing the
>>> CampaignService.get() call in the UseOAuth.php example with a report
>>> download request, and then run that on both servers?
>>>
>>> Best,
>>> - Eric
>>>
>>> On Tue, Jun 12, 2012 at 3:51 AM, Chirag <[email protected]<javascript:>
>>> > wrote:
>>>
>>>> Hello Eric,
>>>> Sorry for late reply.
>>>>
>>>> Finally i got access from server to run command line example
>>>> "UseOAuth.php".
>>>> Yes on both server it works fine, but on server where adhoc report is
>>>> not working there i got php warning for date.
>>>>
>>>> PHP Warning: date(): It is not safe to rely on the system's timezone
>>>> settings. You are *required* to use the date.timezone setting or the
>>>> date_default_timezone_set() function. In case you used any of those
>>>> methods
>>>> and you are still getting this warning, you most likely misspelled the
>>>> timezone identifier. We selected 'Asia/Calcutta' for 'IST/5.0/no DST'
>>>> instead in /var/www/html/src/Google/Api/**Ads/Common/Util/Logger.php
>>>> on line 234
>>>>
>>>> Thanks,
>>>> chirag
>>>>
>>>>
>>>> On Monday, June 4, 2012 11:27:57 PM UTC+5:30, Eric Koleda wrote:
>>>>>
>>>>> Hi Chirag,
>>>>>
>>>>> Certainly a tricky problem. As a baseline, can you try running the
>>>>> command line example "UseOAuth.php" on both servers, to see if that works?
>>>>>
>>>>> - Eric
>>>>>
>>>>> On Mon, Jun 4, 2012 at 12:28 PM, Chirag
>>>>> <[email protected]<javascript:>
>>>>> > wrote:
>>>>>
>>>>>> Hi Eric,
>>>>>>
>>>>>> Are these new OAuth tokens or are you using the same token on both
>>>>>> servers?
>>>>>> I am using same Oauth tokens for both servers.
>>>>>>
>>>>>> Can you double check that you are using the same consumer key and
>>>>>> secret on both servers?
>>>>>> Yes, I am using same consumer key and secret.
>>>>>>
>>>>>> Thanks,
>>>>>> chirag
>>>>>>
>>>>>> On Monday, June 4, 2012 7:11:25 PM UTC+5:30, Eric Koleda wrote:
>>>>>>>
>>>>>>> Hi Chirag,
>>>>>>>
>>>>>>> I didn't see any problems or noticeable differences with the broken
>>>>>>> request. Are these new OAuth tokens or are you using the same token on
>>>>>>> both
>>>>>>> servers? Can you double check that you are using the same consumer key
>>>>>>> and
>>>>>>> secret on both servers?
>>>>>>>
>>>>>>> - Eric
>>>>>>>
>>>>>>> On Mon, Jun 4, 2012 at 7:23 AM, Chirag
>>>>>>> <[email protected]<javascript:>
>>>>>>> > wrote:
>>>>>>>
>>>>>>>> Hi Eric,
>>>>>>>>
>>>>>>>> Sorry for late reply.
>>>>>>>> Please find both server's response.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> chirag
>>>>>>>>
>>>>>>>>
>>>>>>>> On Friday, June 1, 2012 11:56:15 PM UTC+5:30, Eric Koleda wrote:
>>>>>>>>>
>>>>>>>>> My apologies again, I was parsing it as milliseconds and not
>>>>>>>>> seconds. That does appear to be correct.
>>>>>>>>>
>>>>>>>>> Regarding my other point, it would be helpful to compare the
>>>>>>>>> Authorization header from the server that is working with the one
>>>>>>>>> from the
>>>>>>>>> server that is not working. Can you post the sanitized version of
>>>>>>>>> both?
>>>>>>>>>
>>>>>>>>> - Eric
>>>>>>>>>
>>>>>>>>> On Fri, Jun 1, 2012 at 1:33 PM, Chirag
>>>>>>>>> <[email protected]<javascript:>
>>>>>>>>> > wrote:
>>>>>>>>>
>>>>>>>>>> Hello Eric,
>>>>>>>>>>
>>>>>>>>>> I think timestamp is correct.
>>>>>>>>>>
>>>>>>>>>> oauth_timestamp="1338338512" is refers to the Wed, 30 May 2012
>>>>>>>>>> 00:41:52 GMT
>>>>>>>>>>
>>>>>>>>>> What are the timestamps like for working requests?
>>>>>>>>>> I am not getting this. I am working with timezone 'Asia/Calcutta'.
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Chirag
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Friday, June 1, 2012 10:19:58 PM UTC+5:30, Eric Koleda wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi Chirag,
>>>>>>>>>>>
>>>>>>>>>>> My apologies, I forgot this was for report downloads, so you
>>>>>>>>>>> should only get a log with the report request. For report requests
>>>>>>>>>>> the
>>>>>>>>>>> OAuth parameters are passed in the Authorization header. The value
>>>>>>>>>>> of the
>>>>>>>>>>> timestamp used seems to be wrong:
>>>>>>>>>>>
>>>>>>>>>>> oauth_timestamp="1338338512"
>>>>>>>>>>>
>>>>>>>>>>> This corresponds to Fri Jan 16 1970 06:45:38 GMT-0500 (EST),
>>>>>>>>>>> which is not correct. What are the timestamps like for working
>>>>>>>>>>> requests?
>>>>>>>>>>>
>>>>>>>>>>> Best,
>>>>>>>>>>> - Eric
>>>>>>>>>>>
>>>>>>>>>>> On Fri, Jun 1, 2012 at 12:32 PM, Chirag
>>>>>>>>>>> <[email protected]<javascript:>
>>>>>>>>>>> > wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hello Eric,
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks for reply.
>>>>>>>>>>>> Yes i will look into date and time suggestion you mentioned.
>>>>>>>>>>>> But,for logging, I have $user->LogAll(); is set.
>>>>>>>>>>>> but i am not getting any log. I just got logs for reporting and
>>>>>>>>>>>> it is attached.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>> chirag
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Friday, June 1, 2012 9:37:09 PM UTC+5:30, Eric Koleda wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Chirag,
>>>>>>>>>>>>>
>>>>>>>>>>>>> It's strange that the error is only appearing on specific
>>>>>>>>>>>>> server environments. The next step in debugging this issue would
>>>>>>>>>>>>> be to take
>>>>>>>>>>>>> a look at the URL the SOAP request is being made to, since the
>>>>>>>>>>>>> PHP client
>>>>>>>>>>>>> library appends the OAuth parameters to the URL. If you enable
>>>>>>>>>>>>> SOAP XML
>>>>>>>>>>>>> logging the URL is recorded in the logs. Perhaps a visual
>>>>>>>>>>>>> inspection of
>>>>>>>>>>>>> the URL will show a difference between the environments.
>>>>>>>>>>>>>
>>>>>>>>>>>>> One possible cause to investigate is whether the date and time
>>>>>>>>>>>>> is configured correctly on the server. When signing the OAuth
>>>>>>>>>>>>> parameters
>>>>>>>>>>>>> the current date/time is used, and if this is incorrect the
>>>>>>>>>>>>> AdWords API
>>>>>>>>>>>>> server may reject the request.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Best,
>>>>>>>>>>>>> - Eric Koleda, AdWords API Team
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Friday, June 1, 2012 2:32:08 AM UTC-4, Chirag wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hello Danial,
>>>>>>>>>>>>>> Any update i am waiting for your reply otherwise i need to
>>>>>>>>>>>>>> change server configuration from centOS to Ubuntu one.
>>>>>>>>>>>>>> Please note that i am using PHP client library.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>> chirag
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Monday, May 28, 2012 9:02:43 PM UTC+5:30, Danial Klimkin
>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hello Chirag,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Are you using any of our client libraries?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> -Danial, AdWords API Team.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Thursday, May 24, 2012 4:52:20 PM UTC+4, Chirag wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Hello All,
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Any special configuration required for Running OAuth 1.0a
>>>>>>>>>>>>>>>> running succesfully?
>>>>>>>>>>>>>>>> I am trying to run one of my report download code, but it
>>>>>>>>>>>>>>>> is giving error :
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> *Error Message: <eye3-stackless title='AuthServer User
>>>>>>>>>>>>>>>> Error OAUTH_TOKEN_HEADER_INVALID'/> AuthenticationError.OAUTH_
>>>>>>>>>>>>>>>> TOKEN_HEADER_INVALID @ ; trigger:'<null>';
>>>>>>>>>>>>>>>> errorDetails:message=Invalid Header
>>>>>>>>>>>>>>>> Service[ReportInfoService.get]
>>>>>>>>>>>>>>>> *
>>>>>>>>>>>>>>>> *
>>>>>>>>>>>>>>>> *
>>>>>>>>>>>>>>>> Please note : It is only has error from few server only.
>>>>>>>>>>>>>>>> This same file is working on my localhost setup and also from
>>>>>>>>>>>>>>>> two of my
>>>>>>>>>>>>>>>> server.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~**********=~=~=~=~=~=~=~=~=~
>>>>>>>>>>>> Also find us on our blog and discussion group:
>>>>>>>>>>>> http://adwordsapi.blogspot.com
>>>>>>>>>>>> http://groups.google.com/**group********/adwords-api<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
>>>>>>>>>>>> [email protected]<javascript:>
>>>>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>>>>> adwords-api...@**google********groups.com <javascript:>
>>>>>>>>>>>> For more options, visit this group at
>>>>>>>>>>>> http://groups.google.com/**group********/adwords-api?hl=en<http://groups.google.com/group/adwords-api?hl=en>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~********=~=~=~=~=~=~=~=~=~
>>>>>>>>>> Also find us on our blog and discussion group:
>>>>>>>>>> http://adwordsapi.blogspot.com
>>>>>>>>>> http://groups.google.com/**group******/adwords-api<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
>>>>>>>>>> [email protected]<javascript:>
>>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>>> adwords-api...@**google******groups.com <javascript:>
>>>>>>>>>> For more options, visit this group at
>>>>>>>>>> http://groups.google.com/**group******/adwords-api?hl=en<http://groups.google.com/group/adwords-api?hl=en>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~******=~=~=~=~=~=~=~=~=~
>>>>>>>> Also find us on our blog and discussion group:
>>>>>>>> http://adwordsapi.blogspot.com
>>>>>>>> http://groups.google.com/**group****/adwords-api<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
>>>>>>>> [email protected]<javascript:>
>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>> adwords-api...@**google****groups.com <javascript:>
>>>>>>>> For more options, visit this group at
>>>>>>>> http://groups.google.com/**group****/adwords-api?hl=en<http://groups.google.com/group/adwords-api?hl=en>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~****=~=~=~=~=~=~=~=~=~
>>>>>> Also find us on our blog and discussion group:
>>>>>> http://adwordsapi.blogspot.com
>>>>>> http://groups.google.com/**group**/adwords-api<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
>>>>>> [email protected]<javascript:>
>>>>>> To unsubscribe from this group, send email to
>>>>>> adwords-api...@**google**groups.com <javascript:>
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/**group**/adwords-api?hl=en<http://groups.google.com/group/adwords-api?hl=en>
>>>>>>
>>>>>
>>>>> --
>>>> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~**=~=~=~=~=~=~=~=~=~
>>>> Also find us on our blog and discussion group:
>>>> http://adwordsapi.blogspot.com
>>>> http://groups.google.com/**group/adwords-api<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 [email protected]<javascript:>
>>>> To unsubscribe from this group, send email to
>>>> adwords-api...@**googlegroups.com <javascript:>
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/adwords-api?hl=en<http://groups.google.com/group/adwords-api?hl=en>
>>>>
>>>
>>> --
>> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>> 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 [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/adwords-api?hl=en
>>
>
>
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
!!!2|||-1|||<eye3-stackless title='AuthServer User Error OAUTH_TOKEN_HEADER_INVALID'/> AuthenticationError.OAUTH_TOKEN_HEADER_INVALID @ ; trigger:'<null>'; errorDetails:message=Invalid Header???