It appears this operation works for Admin level users, but fails for Standard level. It would be helpful if the error message conveyed this.
On Wednesday, January 12, 2022 at 8:56:35 AM UTC-5 Fred Lovine wrote: > Hi, > > We are receiving an error when trying to hide / unhide a customer account > in our MCC. It's not clear if the problem is with our code, or with the API. > > *Here is the error:* > Google\ApiCore\ApiException : { > "message": "Request contains an invalid argument.", > "code": 3, > "status": "INVALID_ARGUMENT", > "details": [ > { > "@type": 0, > "data": "type.googleapis.com > \/google.ads.googleads.v8.errors.GoogleAdsFailure" > }, > { > "@type": 0, > "data": [ > { > "errorCode": { > "managerLinkError": "INVALID_CHANGE" > }, > "message": "The change for mutate link is invalid.", > "location": { > "fieldPathElements": [ > { > "fieldName": "operation" > } > ] > } > } > ] > }, > { > "@type": 0, > "data": "X8YUUXFTJaeUFnYsAY_6sw" > } > ] > } > > *Here is the php code (using Google Ads php client library):* > public function hideUnhideAccount(bool $hide ) > { > $origCustomerClientLink = $this->getCustomerClientLink(); > > $customerClientLink = new CustomerClientLink(); > > $customerClientLink->setResourceName($origCustomerClientLink->getResourceName()); > $customerClientLink->setHidden($hide); > > $customerClientLinkOperation = new CustomerClientLinkOperation(); > $customerClientLinkOperation->setUpdate($customerClientLink); > $customerClientLinkOperation->setUpdateMask(FieldMasks::allSetFieldsOf > ($customerClientLink)); > > $customerClientLinkServiceClient = > $this->client->getCustomerClientLinkServiceClient(); > $customerClientLinkServiceClient->mutateCustomerClientLink( > $this->managerCustomerId, > $customerClientLinkOperation > ); > > } > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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 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 adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/89cde55c-f750-4c41-b5fb-99358ff57461n%40googlegroups.com.