Does Adword Dveloper Test Account has limited access to CustomerService and ManagedCustomerService ?

199 views
Skip to first unread message

m...@jagad.co.id

unread,
May 14, 2015, 9:22:13 AM5/14/15
to adwor...@googlegroups.com
Dear All,

I have successfully call some SOAP method of Adwords API, but failed for CustomerService and ManagedCustomerService.
here s the successfully one:

$ curl \
--header "Content-Type: application/soap+xml" \
--header "Authorization : Bearer Xxxx.xxxxxxxxxxxxxx_1234567890abcdefghijklmnopqrstuvwxyz" \
--data @budget_get.wsdl \
https
://adwords.google.com/api/adwords/cm/v201502/BudgetService

Result:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201502"><requestId>0005160804a92a510ab680a4da004394</requestId><serviceName>BudgetService</serviceName><methodName>get</methodName><operations>1</operations><responseTime>207</responseTime></ResponseHeader></soap:Header><soap:Body><getResponse xmlns="https://adwords.google.com/api/adwords/cm/v201502"><rval><totalNumEntries>3</totalNumEntries><Page.Type>BudgetPage</Page.Type><entries><budgetId>309130621</budgetId><name>Campaign #1</name></entries><entries><budgetId>309131581</budgetId><name>xdigital</name></entries><entries><budgetId>310436581</budgetId><name>test1</name></entries></rval></getResponse></soap:Body></soap:Envelope>

But Failed for ManagedCustomerService :
curl \
--header "Content-Type: application/soap+xml" \
--header "Authorization : Bearer Xxxx.xxxxxxxxxxxxxx_1234567890abcdefghijklmnopqrstuvwxyz" \
--data @mcs_get.wsdl \
https
://adwords.google.com/api/adwords/mcm/v201502/ManagedCustomerService

[AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED] Failed Result:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><ns2:ResponseHeader xmlns:ns2="https://adwords.google.com/api/adwords/mcm/v201502" xmlns="https://adwords.google.com/api/adwords/cm/v201502"><requestId>00051608079b73f80abc8c43e2005f32</requestId><serviceName>ManagedCustomerService</serviceName><methodName>get</methodName><operations>0</operations><responseTime>208</responseTime></ns2:ResponseHeader></soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>[AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED @ ; trigger:'&lt;null&gt;']</faultstring><detail><ns2:ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201502" xmlns:ns2="https://adwords.google.com/api/adwords/mcm/v201502"><message>[AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED @ ; trigger:'&lt;null&gt;']</message><ApplicationException.Type>ApiException</ApplicationException.Type><errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AuthenticationError"><fieldPath></fieldPath><trigger>&lt;null&gt;</trigger><errorString>AuthenticationError.CLIENT_CUSTOMER_ID_IS_REQUIRED</errorString><ApiError.Type>AuthenticationError</ApiError.Type><reason>CLIENT_CUSTOMER_ID_IS_REQUIRED</reason></errors></ns2:ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>

Also Failed for CustomerService that not required 'clientCustomerId' :
curl \
--header "Content-Type: application/soap+xml" \
--header "Authorization : Bearer Xxxx.xxxxxxxxxxxxxx_1234567890abcdefghijklmnopqrstuvwxyz" \
--data @cs_get.wsdl \
https
://adwords.google.com/api/adwords/mcm/v201502/CustomerService

[QuotaCheckError.INVALID_TOKEN_HEADER @ ] Failed Result :
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><ResponseHeader xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201502" xmlns="https://adwords.google.com/api/adwords/mcm/v201502"><ns2:requestId>00051608121ec4880abc77923a003f53</ns2:requestId><ns2:serviceName>CustomerService</ns2:serviceName><ns2:methodName>get</ns2:methodName><ns2:operations>0</ns2:operations><ns2:responseTime>209</ns2:responseTime></ResponseHeader></soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>[QuotaCheckError.INVALID_TOKEN_HEADER @ ]</faultstring><detail><ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/mcm/v201502" xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201502"><ns2:message>[QuotaCheckError.INVALID_TOKEN_HEADER @ ]</ns2:message><ns2:ApplicationException.Type>ApiException</ns2:ApplicationException.Type><ns2:errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:QuotaCheckError"><ns2:fieldPath></ns2:fieldPath><ns2:trigger></ns2:trigger><ns2:errorString>QuotaCheckError.INVALID_TOKEN_HEADER</ns2:errorString><ns2:ApiError.Type>QuotaCheckError</ns2:ApiError.Type><ns2:reason>INVALID_TOKEN_HEADER</ns2:reason></ns2:errors></ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>

The Question is does it an effect of limited access of test account or what make it goes wrong?

Related wsdl files attached.

best regards,
AF



budget_get.wsdl
cs_get.wsdl
mcs_get.wsdl

Josh Radcliff (AdWords API Team)

unread,
May 15, 2015, 10:36:12 AM5/15/15
to adwor...@googlegroups.com, m...@jagad.co.id
Hi AF,

The reason that your requests for ManagedCustomerService and CustomerService are failing is that you are not using the correct XML namespace for the clientCustomerId and developerToken elements in those requests. You're specifying the namespace of:


but those elements belong to namespace:


Please use the correct namespace for the SOAP header elements and let me know if you still encounter issues.

Thanks,
Josh, AdWords API Team

Jagad MCC

unread,
May 15, 2015, 1:12:15 PM5/15/15
to adwor...@googlegroups.com, m...@jagad.co.id
Hi Josh, thankyou for response,

I got this error when change https://adwords.google.com/api/adwords/mcm/v201502 to https://adwords.google.com/api/adwords/cm/v201502 for the SOAP header elements.

$ curl \
> --header "Content-Type: application/soap+xml" \
> --header "Authorization : Bearer Xxxx.xxxxxxxxxxxxxx_1234567890abcdefghijklmnopqrstuvwxyz" \
result:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Unmarshalling Error: unexpected element (uri:"https://adwords.google.com/api/adwords/cm/v201502", local:"RequestHeader"). Expected elements are &lt;{https://adwords.google.com/api/adwords/mcm/v201502}ApiExceptionFault&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}RequestHeader&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}ResponseHeader&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}get&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}getResponse&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}mutate&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}mutateResponse&gt; </faultstring></soap:Fault></soap:Body></soap:Envelope>

Same result for ManagedCustomerService :
$ curl \
> --header "Content-Type: application/soap+xml" \
> --header "Authorization : Bearer Xxxx.xxxxxxxxxxxxxx_1234567890abcdefghijklmnopqrstuvwxyz" \
result:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Unmarshalling Error: unexpected element (uri:"https://adwords.google.com/api/adwords/cm/v201502", local:"RequestHeader"). Expected elements are &lt;{https://adwords.google.com/api/adwords/mcm/v201502}ApiExceptionFault&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}RequestHeader&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}ResponseHeader&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}get&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}getPendingInvitations&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}getPendingInvitationsResponse&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}getResponse&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}mutate&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}mutateLabel&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}mutateLabelResponse&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}mutateLink&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}mutateLinkResponse&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}mutateManager&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}mutateManagerResponse&gt;,&lt;{https://adwords.google.com/api/adwords/mcm/v201502}mutateResponse&gt; </faultstring></soap:Fault></soap:Body></soap:Envelope>

Updated wsdl file attached.
cs_get.wsdl
mcs_get.wsdl

Josh Radcliff (AdWords API Team)

unread,
May 15, 2015, 2:43:23 PM5/15/15
to adwor...@googlegroups.com, m...@jagad.co.id
Hi Jagad MCC,

Simply changing the namespace will not suffice, since the RequestHeader still needs to be from the mcm namespace, while other elements are from the cm namespace. You'll need to use the WSDL for each service to find the proper namespace for each element (e.g., ManagedCustomerService wsdl).

Another, far easier option would be to use one of our client libraries. The client libraries save you from manually generating SOAP XML, so you won't have to deal with all of the minutiae of constructing messages and can simply focus on working with objects.

Thanks,
Josh, AdWords API Team

Jagad MCC

unread,
May 18, 2015, 9:17:53 AM5/18/15
to adwor...@googlegroups.com, m...@jagad.co.id
Hi Josh,

Please simply give me an example of working xml SOAP request for CustomerService and ManagedCustomerService.

best regards,
AF

Josh Radcliff (AdWords API Team)

unread,
May 18, 2015, 10:18:46 AM5/18/15
to adwor...@googlegroups.com, m...@jagad.co.id
Hi AF,

If you need examples of the XML for specific requests, please either:

a. Look at the WSDL for the service OR
b. Run the example using one of the client libraries and look at the logs

Due to the large number of services and options, we do not have sample XML for every type of request and response. Instead, we provide the client libraries so that users don't have to concern themselves with the details of the SOAP protocol.

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