Hi, I'm trying to extend an invitation to link an account with our MCC 
account using the mutateLink operation, and I'm trying to do this using the 
google-ads-python-lib library.

When I try to send the invitation, I get an error 
ManagedCustomerServiceError.NOT_AUTHORIZED.

We have admin access to MCC.

The request I'm sending looks like this (I will delete the developer token 
and the credentials of the accounts envolved):

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/
">
    <soap-env:Header>
        <ns0:RequestHeader xmlns:ns0="
https://adwords.google.com/api/adwords/mcm/v201809";>
            <ns1:developerToken xmlns:ns1="
https://adwords.google.com/api/adwords/cm/v201809";>********
            </ns1:developerToken>
            <ns2:userAgent xmlns:ns2="
https://adwords.google.com/api/adwords/cm/v201809";>Dashbo (AwApi-Python,
                googleads/15.0.2, Python/3.6.3, zeep)
            </ns2:userAgent>
            <ns3:validateOnly xmlns:ns3="
https://adwords.google.com/api/adwords/cm/v201809";>false</ns3:validateOnly>
            <ns4:partialFailure xmlns:ns4="
https://adwords.google.com/api/adwords/cm/v201809
">false</ns4:partialFailure>
        </ns0:RequestHeader>
    </soap-env:Header>
    <soap-env:Body>
        <ns0:mutateLink xmlns:ns0="
https://adwords.google.com/api/adwords/mcm/v201809";>
            <ns0:operations>
                <ns1:operator xmlns:ns1="
https://adwords.google.com/api/adwords/cm/v201809";>ADD</ns1:operator>
                <ns0:operand>
                    
<ns0:managerCustomerId>**********</ns0:managerCustomerId>
                    <ns0:clientCustomerId>**********</ns0:clientCustomerId>
                    <ns0:linkStatus>PENDING</ns0:linkStatus>
                </ns0:operand>
            </ns0:operations>
        </ns0:mutateLink>
    </soap-env:Body>
</soap-env:Envelope>

And this is the response I'm receiving:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
<soap:Header>
    <ResponseHeader xmlns:ns2="
https://adwords.google.com/api/adwords/cm/v201809";
                    xmlns="
https://adwords.google.com/api/adwords/mcm/v201809";>
        <ns2:requestId>00058414095e34100aa33dc4c00f6f46</ns2:requestId>
        <ns2:serviceName>ManagedCustomerService</ns2:serviceName>
        <ns2:methodName>mutateLink</ns2:methodName>
        <ns2:operations>1</ns2:operations>
        <ns2:responseTime>243</ns2:responseTime>
    </ResponseHeader>
</soap:Header>
<soap:Body>
    <soap:Fault>
        <faultcode>soap:Server</faultcode>
        <faultstring>[ManagedCustomerServiceError.NOT_AUTHORIZED @ 
operations[0]]</faultstring>
        <detail>
            <ApiExceptionFault xmlns="
https://adwords.google.com/api/adwords/mcm/v201809";
                               xmlns:ns2="
https://adwords.google.com/api/adwords/cm/v201809";>
                <ns2:message>[ManagedCustomerServiceError.NOT_AUTHORIZED @ 
operations[0]]</ns2:message>
                
<ns2:ApplicationException.Type>ApiException</ns2:ApplicationException.Type>
                <ns2:errors xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";
                            xsi:type="ManagedCustomerServiceError">
                    <ns2:fieldPath>operations[0]</ns2:fieldPath>
                    <ns2:fieldPathElements>
                        <ns2:field>operations</ns2:field>
                        <ns2:index>0</ns2:index>
                    </ns2:fieldPathElements>
                    <ns2:trigger/>
                    
<ns2:errorString>ManagedCustomerServiceError.NOT_AUTHORIZED</ns2:errorString>
                    
<ns2:ApiError.Type>ManagedCustomerServiceError</ns2:ApiError.Type>
                    <reason>NOT_AUTHORIZED</reason>
                </ns2:errors>
            </ApiExceptionFault>
        </detail>
    </soap:Fault>
</soap:Body>
</soap:Envelope>

I'm not sure of what's happening. Any help will be appreciated.

Thank you!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b2e6ac51-aacf-4b10-9a8a-1ddac91b231d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Extend ... fede
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to