I'm stuck trying to get the example with cURL from the page to work:
https://developers.google.com/adwords/api/docs/guides/basic-concepts
The code
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Header>
<ns1:clientCustomerId>MY_TEST_ACCOUNT_ID</ns1:clientCustomerId>
<ns1:developerToken>MY_NON_APPROVED_TOKEN</ns1:developerToken>
<ns1:userAgent>Foo Bar (fizzbuzz)</ns1:userAgent>
<ns1:validateOnly>false</ns1:validateOnly>
<ns1:partialFailure>false</ns1:partialFailure>
</ns1:RequestHeader>
</soapenv:Header>
<soapenv:Body>
<operations>
<operator>ADD</operator>
<operand>
<name>Hello World</name>
<status>PAUSED</status>
<budget>
<budgetId>987654321</budgetId>
</budget>
<positiveGeoTargetType>DONT_CARE</positiveGeoTargetType>
</settings>
<optIn>false</optIn>
</settings>
<networkSetting>
<targetGoogleSearch>true</targetGoogleSearch>
<targetSearchNetwork>true</targetSearchNetwork>
<targetContentNetwork>false</targetContentNetwork>
</networkSetting>
<biddingStrategyConfiguration>
<enhancedCpcEnabled>false</enhancedCpcEnabled>
</biddingScheme>
</biddingStrategyConfiguration>
</operand>
</operations>
</mutate>
</soapenv:Body>
</soapenv:Envelope>
I've got my Oauth token and I copy pasted and replaced the values in the example payload with my own details but when I try to run it it outputs an error
curl --header "Content-Type: application/soap+xml" \
--header "Authorization : Bearer ya29.LONGLONGLONGSTRING" \
--data @data.xml \
And the error:
<soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Unmarshalling Error: cvc-elt.4.2: Cannot resolve 'ns3:KeywordMatchSetting' to a type definition for element 'settings'. </faultstring></soap:Fault></soap:Body></soap:Envelope>
Then if I remove that line from the XML file...
<soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><ResponseHeader xmlns="
https://adwords.google.com/api/adwords/cm/v201506"><requestId>00051ff3c60626180abfa5415a00309c</requestId><serviceName>CampaignService</serviceName><methodName>mutate</methodName><operations>0</operations><responseTime>40</responseTime></ResponseHeader></soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>[AuthenticationError.OAUTH_TOKEN_INVALID @ ; trigger:'<null>']</faultstring><detail><ApiExceptionFault xmlns="
https://adwords.google.com/api/adwords/cm/v201506"><message>[AuthenticationError.OAUTH_TOKEN_INVALID @ ; trigger:'<null>']</message><ApplicationException.Type>ApiException</ApplicationException.Type><errors xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:type="AuthenticationError"><fieldPath></fieldPath><trigger><null></trigger><errorString>AuthenticationError.OAUTH_TOKEN_INVALID</errorString><ApiError.Type>AuthenticationError</ApiError.Type><reason>OAUTH_TOKEN_INVALID</reason></errors></ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>
I don't understand how the first example and I can still get it wrong?
Any pointers on how to solve is appreciated!
best,