google-ads-api
google-ads-api copied to clipboard
Mutate operations must have 'create', 'update', or 'remove' specified
Hi, I'm trying to delete a campaign and I'm getting an error:
await customer.mutateResources([
{
entity: 'campaign',
operation: 'remove',
resource_name: resource_name,
},
]);
{
"error_code": {
"request_error": "OPERATION_REQUIRED"
},
"message": "Mutate operations must have 'create', 'update', or 'remove' specified.",
"location": {
"field_path_elements": [
{
"field_name": "mutate_operations",
"index": 0
},
{
"field_name": "campaign_operation"
}
]
}
}
Hi, i have same problem, with CustomerUserAccess
and CustomerUserAccessInvitation
resources, when trying to make any mutation operation
@hcyildirim have you found a way how to solve it ?
receving same response
GoogleAdsFailure {
errors: [
GoogleAdsError {
error_code: [ErrorCode],
message: "Mutate operations must have 'create', 'update', or 'remove' specified.",
location: [ErrorLocation]
}
],
request_id: 'llPd2Z1j81XqbgfwBw8BpQ'
}
Hello 👋 I have the same issue as well when trying to create a smart campaign setting
const req = SmartCampaignSetting.create({
campaign: campaignResourceName,
phone_number: {
country_code: request.campaign.prefix,
phone_number: request.campaign.phone_number,
},
advertising_language_code: request.targeting.advertisement_language,
final_url: 'https://www.example.com',
business_name: 'Lorem ipsum',
});
const response = await customer.mutateResources([
{
entity: 'smart_campaign_setting',
operation: 'create',
resource: req,
},
]);
@hcyildirim @KirillPerepelitsa did you find the root cause for this type of error?