Linking Adwords Account to MCC Account Not Authorized

39 views
Skip to first unread message

Anouar Kacem

unread,
Nov 8, 2018, 1:11:21 AM11/8/18
to AdWords API and Google Ads API Forum

I am trying to link an Adwords Account to MCC Account

  1. Adwords Account : User1 (Our Client)
  2. MCC Account: User2 (Our Company)

  3. I created a project/application on google console developer to get Client_ID and Client_Secret using User2 email.
  4. I recovered Access Token/Refresh Token for User1 using client_id + client_secret
  5. Now using a production developer token with Standard Access (User2 is a manager in the related MCC Account), Client_IDClient_SecretRefresh_TokenAccess_Token and ClientCustomerID (User1)
SOAP Request :

<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cm="https://adwords.google.com/api/adwords/cm/v201802" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:tns="https://adwords.google.com/api/adwords/mcm/v201802" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Header> <ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/mcm/v201802" xmlns="https://adwords.google.com/api/adwords/mcm/v201802"> <ns1:developerToken>ProductionDeveloperToken</ns1:developerToken> <ns1:userAgent>ApplicationName</ns1:userAgent> <ns1:validateOnly>false</ns1:validateOnly> <ns1:clientCustomerId>User1 clientCustomerID</ns1:clientCustomerId> </ns1:RequestHeader> </soap:Header> <soap:Body> <mutateLink xmlns="https://adwords.google.com/api/adwords/mcm/v201802"> <operations> <ns1:operator xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201802">ADD</ns1:operator> <operand xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201802"> <managerCustomerId>User MCCCustomerID</managerCustomerId> <clientCustomerId>User1 clientCustomerID</clientCustomerId> <linkStatus>PENDING</linkStatus> </operand> </operations> </mutateLink> </soap:Body> </soap:Envelope>

SOAP Response :

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


What am I missing here ? 

Thank you in advance

Reply all
Reply to author
Forward
0 new messages