Re: Getting INVALID_ID error even though I have confirmed that the keyword ID and AdGroupId are correct?

23 views
Skip to first unread message
Message has been deleted

a...@spatially.com

unread,
Oct 25, 2017, 11:46:12 AM10/25/17
to AdWords API Forum
This is the code I am using:

private fun SetKeywordStatus(keywordId: Long, adGroupId: Long, status: UserStatus)
{
val keyword = Criterion()
keyword.id = keywordId

val keywordBiddableAdGroupCriterion = BiddableAdGroupCriterion()
keywordBiddableAdGroupCriterion.adGroupId = adGroupId
keywordBiddableAdGroupCriterion.criterion = keyword
keywordBiddableAdGroupCriterion.userStatus = status

// Create operations.
val operation = AdGroupCriterionOperation()
operation.operand = keywordBiddableAdGroupCriterion
operation.operator = Operator.SET

val result = adGroupCriterionService.mutate(arrayOf(operation))
for (result in result.value) {
println("KeywordId ${keywordId} had its status changed")
}
}
Message has been deleted

Jude Amagoh

unread,
Oct 25, 2017, 3:49:12 PM10/25/17
to AdWords API Forum
Hi,

I'd be glad to help you troubleshot this issue. EntityNotFound.INVALID_ID is usually caused when you're referencing the ID of an entity from a different account. Could you verify that's not the case here by utilize the AdGroupService.get() method. If not, could you kindly provide your CID number along with your SOAP logs so I can take a closer look? Please use Reply privately to author when responding. 

Best Regards,
Jude, Adwords API Team

a...@spatially.com

unread,
Oct 26, 2017, 1:42:56 PM10/26/17
to AdWords API Forum
Sorry but how would I verify with AdGroupService.get()?

Jude Amagoh

unread,
Oct 26, 2017, 3:58:21 PM10/26/17
to AdWords API Forum
Hi,

If you are using our Java client library, you can check out the GetAdGroups Java example. Example code in other languages are provided here. You can use AdGroupService.get() to retrieve the AdGroups in an account and check if the AdGroup with ID 47280168706 exists in the account. If this AdGroup indeed exists in the account, please let me know. Please enable logging and provide the SOAP request and response logs so I can take a look. Please use Reply privately to author when responding. 
Reply all
Reply to author
Forward
0 new messages