LOGIN_COOKIE_REQUIRED error when using soap UI

93 views
Skip to first unread message

Salman Hoseini

unread,
Feb 23, 2015, 2:45:43 PM2/23/15
to adwor...@googlegroups.com
Hello,

I have my soap request like this and  I'm using SOAP UI tool. I have both oauth access token and refresh token. I am putting the access token in the soap request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v20="https://adwords.google.com/api/adwords/cm/v201409">
   
<soapenv:Header>
     
<v20:RequestHeader>
         
<v20:clientCustomerId>123-123-1234</v20:clientCustomerId>
         
<v20:developerToken>ya29.IassdaWWKzdP_RfJKpjdZdsfbsbfsDSFSDFdzsfweHJR-76BCXvxgdr-4wmmC_sgXU</v20:developerToken>
         
<v20:userAgent>gender.test.v1</v20:userAgent>
         
<v20:validateOnly>true</v20:validateOnly>
         
<v20:partialFailure>true</v20:partialFailure>
     
</v20:RequestHeader>
   
</soapenv:Header>
   
<soapenv:Body>
     
<v20:getReportFields>
         
<!--Optional:-->
         
<v20:reportType>AD_PERFORMANCE_REPORT</v20:reportType>
     
</v20:getReportFields>
   
</soapenv:Body>
</soapenv:Envelope>

I'm trying to connect to Report services but I keep getting error in the response which looks like message bellow:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   
<soap:Header>
     
<ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201409">
         
<requestId>00050fc6810dd5700abfa08a0700663e</requestId>
         
<serviceName>ReportDefinitionService</serviceName>
         
<methodName>getReportFields</methodName>
         
<operations>0</operations>
         
<responseTime>54</responseTime>
     
</ResponseHeader>
   
</soap:Header>
   
<soap:Body>
     
<soap:Fault>
         
<faultcode>soap:Server</faultcode>
         
<faultstring>[AuthenticationError.LOGIN_COOKIE_REQUIRED @ ; trigger:'&lt;null>']</faultstring>
         
<detail>
           
<ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201409">
               
<message>[AuthenticationError.LOGIN_COOKIE_REQUIRED @ ; trigger:'&lt;null>']</message>
               
<ApplicationException.Type>ApiException</ApplicationException.Type>
               
<errors xsi:type="AuthenticationError" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                 
<fieldPath/>
                 
<trigger>&lt;null></trigger>
                 
<errorString>AuthenticationError.LOGIN_COOKIE_REQUIRED</errorString>
                 
<ApiError.Type>AuthenticationError</ApiError.Type>
                 
<reason>LOGIN_COOKIE_REQUIRED</reason>
               
</errors>
           
</ApiExceptionFault>
         
</detail>
     
</soap:Fault>
   
</soap:Body>
</soap:Envelope>

I am positive that my access token is valid (not the one I pasted here since this is mocked) and I have correct client id. what am I missing?

Thanks a lot

Josh Radcliff (AdWords API Team)

unread,
Feb 25, 2015, 8:49:48 AM2/25/15
to adwor...@googlegroups.com
Hi,

It looks like you placed your OAuth access token in the developerToken SOAP header, but that is supposed to contain your developer token from your MCC. The OAuth access token goes in the Authorization HTTP header.

Please refer to the SOAP Primer for more details on the required SOAP and HTTP headers.

Thanks,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages