Hi Josh,

Thanks for your reply and it helps me to fix the problem. 

It seems that when adding the "Authorization: Bearer THE_ACCESS_TOKEN" 
header, I need to add " & vbCrlf" at the end like this:

Header.add "Authorization: Bearer THE_ACCESS_TOKEN" & vbCrLf

But the interesting part is, my original code with "Authorization: 
GoogleClient Token" header without " & vbCrLf" works fine. 

Anyway, thanks for your helps and it works fine now.
 
Regards,
David



On Saturday, March 15, 2014 1:31:43 AM UTC+11, Josh Radcliff (AdWords API 
Team) wrote:
>
> Hi David,
>
> Are you sure that you are passing the Authorization 
> header<https://developers.google.com/adwords/api/docs/guides/authentication#http_request_header>,
>  
> and that you are formatting it properly?  The only way I can get the 
> *LOGIN_COOKIE_REQUIRED* error is if I do not pass the *Authorization*header.  
> That error basically means that no authentication information 
> (ClientLogin or OAuth2) was found in the request.
>
> Also, I would recommend using one of our Client 
> Libraries<https://developers.google.com/adwords/api/docs/clientlibraries>. 
>  The libraries take care of all of this for you and save you from dealing 
> with the minutiae of SOAP.
>
> Thanks,
> Josh, AdWords API Team
>
> On Friday, March 14, 2014 1:27:50 AM UTC-4, Dave L wrote:
>>
>> Hi,
>>
>> I am upgrading from the Auth Token to the new oAuth2 Access Token. I am 
>> not using any client library, I am using SOAP.
>>
>> 1. I am able to get my Access Token (and Refresh Token) successfully. 
>>
>> 2. Now, when I am using the new Access Token to call the API, I received "
>> AuthenticationError.LOGIN_COOKIE_REQUIRED" error. 
>>
>> 3. My code with Auth Token was working fine before. I have followed the 
>> Google instruction as below
>>
>> - Add "Authorization: Bearer " & sAccessToken" to the HTTP header.
>> - Remove the "<cm:authToken>" & .AuthToken & "</cm:authToken>" from the 
>> SOAP header.
>> - All other codes remain the same
>>
>> But I received the "AuthenticationError.LOGIN_COOKIE_REQUIRED" error. 
>> Here is the SOAP Request string for Get Keywords:
>>
>> **NOTE: following SOAP request worked fine with my old AuthToken.
>>
>> =============
>> <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="
>> http://schemas.xmlsoap.org/soap/envelope/"; xmlns:o="
>> https://adwords.google.com/api/adwords/o/v201309"; xmlns:cm="
>> https://adwords.google.com/api/adwords/cm/v201309"; xmlns:mcm="
>> https://adwords.google.com/api/adwords/mcm/v201309";  xmlns:xsd="
>> http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance"; xmlns:soap-enc="
>> http://schemas.xmlsoap.org/soap/encoding/";>
>> <soap:Header>
>> <RequestHeader  xmlns="https://adwords.google.com/api/adwords/cm/v201309
>> ">
>> <cm:developerToken>eAR............2guhN-_dg</cm:developerToken>
>> <cm:clientCustomerId>8391....982</cm:clientCustomerId>
>> <cm:userAgent>PPCManager</cm:userAgent>
>> </RequestHeader>
>> </soap:Header>
>> <soap:Body>
>> <get xmlns="https://adwords.google.com/api/adwords/cm/v201309";>
>> <serviceSelector>
>> <fields>Id</fields>
>> <fields>AdGroupId</fields>
>> <fields>CriteriaType</fields>
>> <fields>CriterionUse</fields>
>> <fields>KeywordText</fields>
>> <fields>Status</fields>
>> <fields>DestinationUrl</fields>
>> <fields>FirstPageCpc</fields>
>> <fields>KeywordMatchType</fields>
>> <fields>QualityScore</fields>
>> <fields>Text</fields>
>> <fields>MaxCpc</fields>
>> <predicates>
>> <field>Status</field>
>> <operator>IN</operator>
>> <values>ACTIVE</values>
>> <values>PAUSED</values>
>> </predicates>
>> <predicates>
>> <field>CriteriaType</field>
>> <operator>EQUALS</operator>
>> <values>KEYWORD</values>
>> </predicates>
>> <predicates>
>> <field>AdGroupId</field>
>> <operator>IN</operator>
>> <values>494068713</values>
>> <values>1630184523</values>
>> <values>8558771673</values>
>> </predicates>
>> <dateRange>
>> <min>20140313</min>
>> <max>20140313</max>
>> </dateRange>
>> </serviceSelector>
>> </get>
>> </soap:Body>
>> </soap:Envelope>
>>
>> ======================
>>
>> Could you please let me know what I am doing wrong? 
>>
>> Many thanks.
>>
>> David
>>
>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to