RESOURCE_NOT_FOUND error for existing resource

309 views
Skip to first unread message

Kostiantyn Babych

unread,
Oct 31, 2022, 10:08:19 AM10/31/22
to Google Ads API and AdWords API Forum
Hello.

I am working on REST API client for Google Ads using REST interface.
I am trying to mutate existing campaign (set status) but receive only RESOURCE_NOT_FOUND error. But, resource exists.
Could you please help me to find out an error?
I am using POST request type for this url:

JSON body of request:
{
"operations":
[
{
"updateMask":"status",
"update":
{
"resourceName":"customers/{my_customer_id}/campaigns/{my_camp_id}",
"status":"ENABLED"
}
}
]
}

And receive next error:
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"errors": [
{
"errorCode": {
"mutateError": "RESOURCE_NOT_FOUND"
},
"message": "Resource was not found.",
"trigger": {
"stringValue": "CampaignId: {my_camp_id}"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
},
{
"fieldName": "update"
},
{
"fieldName": "resource_name"
}
]
}
}
],
"requestId": "0dt678xoXk2_cbqyD0EfUQ"
}
]
}
}

Google Ads API Forum Advisor

unread,
Oct 31, 2022, 1:13:32 PM10/31/22
to kosti...@peakventures.co, adwor...@googlegroups.com
Hi Kostiantyn,

Thank you for reaching out to our API support team.

So I can take a closer look at the error you encountered, could you share your complete request and response logs (with all the IDs) privately, using the Reply privately to author option? If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Furthermore, prior to performing the mutate operation on the said resource, could you confirm whether you also performed a campaign resource request and verified that the campaign.resource_name indeed exists in the same account / customer_id you used for the mutate?

Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


ref:_00D1U1174p._5004Q2fq2qR:ref
Reply all
Reply to author
Forward
0 new messages