Error creating accounts in sub manager accounts

30 views
Skip to first unread message

Emiliano Martinez

unread,
Jun 3, 2015, 11:31:36 AM6/3/15
to adwor...@googlegroups.com
Hi, Forum:

Im having problems creating accounts in sub manager accounts.
If i create an account with an MCC account all works perfectly, here is the request:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:RequestHeader soapenv:mustUnderstand="0" xmlns:ns1="https://adwords.google.com/api/adwords/mcm/v201409">
<ns2:clientCustomerId xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201409">1893844881</ns2:clientCustomerId>
<ns3:developerToken xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201409">XXXXXXXXXXXXXX</ns3:developerToken>
<ns4:userAgent xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201409">XXXXXX (AwApi-Java, AdWords-Axis/1.37.0, Common-Java/1.37.0, Axis/1.4, Java/1.7.0_17, maven)</ns4:userAgent>
<ns5:validateOnly xmlns:ns5="https://adwords.google.com/api/adwords/cm/v201409">false</ns5:validateOnly>
<ns6:partialFailure xmlns:ns6="https://adwords.google.com/api/adwords/cm/v201409">false</ns6:partialFailure>
</ns1:RequestHeader>
</soapenv:Header>
<soapenv:Body>
<mutate xmlns="https://adwords.google.com/api/adwords/mcm/v201409">
<operations>
<ns7:operator xmlns:ns7="https://adwords.google.com/api/adwords/cm/v201409">ADD</ns7:operator>
<operand>
<name>Test account from MCC</name>
<currencyCode>USD</currencyCode>
<dateTimeZone>America/Chicago</dateTimeZone>
</operand>
</operations>
</mutate>
</soapenv:Body>
</soapenv:Envelope>

And the response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<ns2:ResponseHeader xmlns:ns2="https://adwords.google.com/api/adwords/mcm/v201409" xmlns="https://adwords.google.com/api/adwords/cm/v201409">
<requestId>0005179e8655fc580ac4f6e99b00cd0b</requestId>
<serviceName>ManagedCustomerService</serviceName>
<methodName>mutate</methodName>
<operations>0</operations>
<responseTime>698</responseTime>
</ns2:ResponseHeader>
</soap:Header>
<soap:Body>
<ns2:mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201409" xmlns:ns2="https://adwords.google.com/api/adwords/mcm/v201409">
<ns2:rval>
<ns2:value>
<ns2:name>Test account from MCC</ns2:name>
<ns2:customerId>4117105163</ns2:customerId>
<ns2:canManageClients>false</ns2:canManageClients>
<ns2:currencyCode>USD</ns2:currencyCode>
<ns2:dateTimeZone>America/Chicago</ns2:dateTimeZone>
</ns2:value>
</ns2:rval>
</ns2:mutateResponse>
</soap:Body>
</soap:Envelope>

But if i use the sub mcc account, sending this:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:RequestHeader soapenv:mustUnderstand="0" xmlns:ns1="https://adwords.google.com/api/adwords/mcm/v201409">
<ns2:clientCustomerId xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201409">5435475134</ns2:clientCustomerId>
<ns3:developerToken xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201409">XXXXXXXXXXXXXXXX</ns3:developerToken>
<ns4:userAgent xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201409">XXXXXXXXX (AwApi-Java, AdWords-Axis/1.37.0, Common-Java/1.37.0, Axis/1.4, Java/1.7.0_17, maven)</ns4:userAgent>
<ns5:validateOnly xmlns:ns5="https://adwords.google.com/api/adwords/cm/v201409">false</ns5:validateOnly>
<ns6:partialFailure xmlns:ns6="https://adwords.google.com/api/adwords/cm/v201409">false</ns6:partialFailure>
</ns1:RequestHeader>
</soapenv:Header>
<soapenv:Body>
<mutate xmlns="https://adwords.google.com/api/adwords/mcm/v201409">
<operations>
<ns7:operator xmlns:ns7="https://adwords.google.com/api/adwords/cm/v201409">ADD</ns7:operator>
<operand>
<name>Test account from Sub MCC</name>
<currencyCode>USD</currencyCode>
<dateTimeZone>America/Chicago</dateTimeZone>
</operand>
</operations>
</mutate>
</soapenv:Body>
</soapenv:Envelope>

I get the following error:

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

Im not really sure if this happened all the time, or it is something related to an API change, the thing is that in the Adwords UI i have no problems, and with the API yes.

Any help is going to be very welcome!
Thanks and regards
Emiliano


Danial Klimkin

unread,
Jun 3, 2015, 11:53:20 AM6/3/15
to adwor...@googlegroups.com, emiliano...@gmail.com
Hello Emiliano,


The account 5435475134 is not a sub-account of account 1893844881, so if you are using the same credentials, the request is expected to fail.

Please make sure the login you are authorized with has administrative access to the MCC you specify in clientCustomerId field.


-Danial, AdWords API Team.

Emiliano Martinez

unread,
Jun 3, 2015, 12:27:55 PM6/3/15
to adwordsapiad...@google.com, adwor...@googlegroups.com
Danial,

Thank you very much! We were mixing ids from production and test!
Next time im going to be checking everything before posting :(

Regards
Emiliano

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@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 a topic in the Google Groups "AdWords API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/IPzlkUwMRPw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/a6655f4b-a8fe-4ade-a1d3-2263831af72b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages