Hi, 
Thanks for the reply. It solved the problem but another problem arrived. 
Now, I'm getting this 

{
  "error": {
    "status": "PERMISSION_DENIED", 
    "message": "The caller does not have permission", 
    "code": 403, 
    "details": [
      {
        "errors": [
          {
            "errorCode": {
              "authorizationError": "USER_PERMISSION_DENIED"
            }, 
            "message": "User doesn't have permission to access customer. 
Note: If you're accessing a client customer, the manager's customer id must 
be set in the 'login-customer-id' header. See 
https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid
"
          }
        ], 
        "@type": 
"type.googleapis.com/google.ads.googleads.v10.errors.GoogleAdsFailure", 
        "requestId": "hH5m60oydlq04UL_uoSHUg"
      }
    ]
  }
}

I have a manager account and i have a client who has his google ads 
account. I'm trying to connect his client account under my manager account 
so that I can manage his google ads and get report of his campaigns. I have 
completed the authentication & authorization, added the access token as 
header along with developer token, and login-customer-id. I found in the 
docs that, if I wanna connect my manager account with any other client 
account, I have to use the customers.customerClientLinks method. 
But it's throwing this error. 

So, my question is, Can I connect any external google ads account with my 
manager account through REST API? How?
And after adding them, Can I see them listed under the sub-account section 
in google ads manager account?

Can you help please?


On Tuesday, June 7, 2022 at 8:26:49 PM UTC+6 adsapi wrote:

> Hi Kazi,  Thank you for reaching out to Google Ads API support. The errors 
> returned are a good starting point to find out how to send a correct 
> request.
>
> For the error "RESOURCE_NAME_MALFORMED" for field Name "client_customer" 
> the specifics of the error returned is "Resource name '1650865311' is 
> malformed: expected 'customers/{customer_id}"for "fieldName": 
> "client_customer" To fix this you can replace the value of "1650865311" for 
> the key "clientCustomer" with  "customers/1650865311".
>
> For the error "CANNOT_SET_ID_FOR_CREATE" for field name "resource_name" 
> the specifics of the error returned is "Do not set the id field while 
> creating new resources." To fix this you can remove the key - value pair 
> of "managerLinkId", it is already implied by the HTTP header which should 
> be "
> https://googleads.googleapis.com/v10/customers/1650865311/customerClientLinks:mutate
> ".
>
> For the error IMMUTABLE_FIELD for the field name "hidden", the specifics 
> of the error is "Field 'hidden' cannot be modified by 'CREATE' operation.". 
> To fix this error you may take out the key - value pair of "hidden" from 
> the "create" operation and update the "hidden" field in a second "update" 
> operation.
>
> Here are 2 operations that will get you the desired outcome: 
>    
>    1. 
>    
>    
>    {
>        "operation": { 
>            "create": {
>             "status": "PENDING",
>      "clientCustomer": "customers/1650865311",
>       
>    }
>            },
>         
>    }
>    
>    
>    
>    2. 
>    
>    
>    {
>        "operation": { 
>    "updateMask": "hidden",
>            "update": {
>    "resourceName": 
> "customers/1650865311/customerClientLinks/1650865311~1650865311",
>    "hidden": true
>       
>    }
>            },
>         
>    }
>    
>    
>    
>    
>    
> Feel free to get back to us.
>
> Regards,
>
> [image: Google Logo] 
> Aryeh 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2bd2cU:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/7173b880-5d49-4131-83db-2faf234297fbn%40googlegroups.com.
  • Is... Kazi Khayruzzaman
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Kazi Khayruzzaman
        • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
          • ... Kazi Khayruzzaman
            • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
              • ... Kazi Khayruzzaman

Reply via email to