google-ads-api
google-ads-api copied to clipboard
Error "Mutate operations must have 'create', 'update', or 'remove' specified" while creating customer client links
Getting the error in case of creating billing setup and customer client links both.
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
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!
@MitulGedeeya Could you specify the error you are receiving and provide a snippet of the code you are running?
@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.
@Zikoel did you try to reproduce the bug? :crossed_fingers:
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.
@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?
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 hi, did you manage to solve this error? i am stuck at this error for hours. thanks
Error is still present with 9.0.
Error still in v10. any updates about it?