CriterionUserInterest

262 views
Skip to first unread message

santi.semp...@gmail.com

unread,
Apr 10, 2017, 5:18:58 AM4/10/17
to AdWords API Forum
Hello,

I am trying to add a targeting criteria to a campaign/adgroup but it keeps raising the same error. I am trying to add a user interest (affinity audiences and in-market) criteria to an specific campaign but it gives me the following error:
suds.WebFault: Server raised fault: '[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro]'
The code snippet I use is:

  operations.append({
'operator': 'ADD',
'operand': {
'xsi_type': 'BiddableAdGroupCriterion',
'adGroupId': ad_group_id,
'criterion': {
'xsi_type': 'CriterionUserInterest',
# Create gender criteria. The IDs can be found in the
# documentation:
# https://developers.google.com/adwords/api/docs/appendix/genders.
'id': INTEREST
}
}
})

response = ad_group_criterion_service.mutate(operations)


Also, when I try to get all the targetable user interests via constant_data_service.getUserInterestCriterion() it throws a similar error.

I would appreciate if you could help me.

Thank you,
Best,
Santi

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Apr 10, 2017, 2:33:39 PM4/10/17
to AdWords API Forum
Hi Santi, 

Sometimes these errors are caused due to temporary issues and if that is the case, they will go away on retry. We have seen that sometimes the incorrect input parameters also might cause these errors. I see that your request to add the CriterionUserInterest to the given AdGroup is not formed correctly. Could you try something like the sample given below and let me know if the CriterionUserInterest is getting added?

  criterionUserInterest1 = {
      'xsi_type': 'BiddableAdGroupCriterion',
      'adGroupId': ad_group_id,
      'criterion': {
          'xsi_type': 'CriterionUserInterest',
          'userInterestId': '80690',
          'userInterestName': 'Language'
      }

Could you please share your SOAP logs for the other two cases (setting targeting criterion and constant data service) where you are facing issues? This will help me take a closer look at your problem.


Thanks,
Sreelakshmi, AdWords API Team

n.mir...@arcane.ws

unread,
Jan 17, 2018, 4:09:14 AM1/17/18
to AdWords API Forum
Hey guys,

I have a very similar problem. Do you guys have any suggestion?

@Sreelakshmi I tried your solution but got another error: "soap:Client: [AdGroupCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand]"

Thanks,
Nima

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Jan 17, 2018, 10:10:13 AM1/17/18
to AdWords API Forum
Hi Nima, 

Could you double check if the xsi_type of the criterion is set in your code? If yes, could you enable logging and share the complete SOAP logs? Please make sure to redact all the sensitive information in your logs. If you need instructions to enable logging, please check the README file of the client library that you are using. 

Ankit Rawat

unread,
Apr 16, 2019, 6:44:40 AM4/16/19
to AdWords API and Google Ads API Forum
Same problem i am using php client library.
Reply all
Reply to author
Forward
0 new messages