google-ads-api icon indicating copy to clipboard operation
google-ads-api copied to clipboard

Error "Mutate operations must have 'create', 'update', or 'remove' specified" while creating customer client links

Open heymitul opened this issue 2 years ago • 11 comments

Getting the error in case of creating billing setup and customer client links both.

heymitul avatar Aug 18 '21 16:08 heymitul

When I tried an API directly from postman it worked.

used following API:

https://developers.google.com/google-ads/api/rest/reference/rest/v8/customers.customerClientLinks/mutate

heymitul avatar Aug 19 '21 05:08 heymitul

Any snippets of code to reproduce the error? You know if you are a developer.. without a snippets to recreate the problem no one is able to understand what you say!

Zikoel avatar Aug 23 '21 10:08 Zikoel

@MitulGedeeya Could you specify the error you are receiving and provide a snippet of the code you are running?

wcoots avatar Aug 23 '21 12:08 wcoots

@WillCooter @Zikoel here is what I am doing while creating customer client link

await customer.customerClientLinks.create([{
        manager_link_id: 'xxxx,
        client_customer: `customers/ADS_ID`,
        status: enums.ManagerLinkStatus.PENDING
      }])

NOTE: I have used same values of manager_link_id and client_customer in API. and it worked there. So, I am sure about those values.

heymitul avatar Aug 23 '21 12:08 heymitul

@Zikoel did you try to reproduce the bug? :crossed_fingers:

heymitul avatar Aug 26 '21 12:08 heymitul

Actually not... I don't have at the moment the ability to create/delete new customers on my test accounts. But I try to gain this in the next days to go deeper to the question! Anyway we can say something:

Because you are not using the generic AdsService to generate your query (use this service i more error prone that the specific service) seems that this is a bug somewhere on the lib (probably on the auto-generated part). With this simple query you are not responsible to set the create/delete/update flag so there is an error on the underlying query builder.

Actually I can't help more.

Zikoel avatar Aug 26 '21 15:08 Zikoel

@MitulGedeeya This may have been related to the authentication issues in the previous release. Could you try again once you are using v8.1.0 of this library and let us know if you are still experiencing the issue?

wcoots avatar Sep 06 '21 12:09 wcoots

Using v8.1.0 and tried v5.2.0

Both having the same error when trying to create an MCC Link ID to later attach to an Account -

GoogleAdsFailure {
    errors: [
        GoogleAdsError {
          error_code: [ErrorCode],
          message: "Mutate operations must have 'create', 'update', or 'remove' specified.",
          location: [ErrorLocation]
        }     
]

It's not permissions because I am able to mutate other resources like Ads etc.

const customerLink = new resources.CustomerClientLink({
              client_customer : 'customers/' + mccID,
              status: enums.ManagerLinkStatus.PENDING 
  });

  let result = await customer.customerClientLinks.create([ customerLink ]).catch((err:any) => {
    console.error(err)
  })

kaomimarketing avatar Sep 08 '21 05:09 kaomimarketing

@kaomimarketing hi, did you manage to solve this error? i am stuck at this error for hours. thanks

zafphire avatar Sep 29 '21 12:09 zafphire

Error is still present with 9.0.

kortemy avatar Nov 29 '21 15:11 kortemy

Error still in v10. any updates about it?

mzdp avatar Oct 12 '22 16:10 mzdp