Help with understanding targeting_criteria API response

bug
ads
targeting
api

#1

We’ve been using the PUT targeting_criteria endpoint for a few months. Starting on October 19th of last month, we started getting the following error when using that endpoint:

{
  "attribute": "targeting_value",
  "message": "Only promotable users for this account can have their followers directly targeted",
  "code": "INVALID_PARAMETER"
}

…when sending these params:

{
  "line_item_id": "272df",
  "similar_to_followers_of_users": "27260086,158314798,209708391,116362700,26257166,105119490,405728790,524657792,404916846,19923144,61003804,611959284,226690054,34507480,601066439,84279963,264107729,181561712,2557521,19426551,403246803,403255314,30973,487736815,434545375,35787166,95023423,834316544,176224244,50618718,9695312,20322929,149760844,561684253,18479513,2425231,180949358,32688098,439125710,586671909,321445166,380399508,152778479,443449421,29166305,890891,21111883,206735576,843112550,166747718,517680491,624556771,623584562,403245020,17919972,43139414,310072711,485918668,560362416,355741893,617580358,22085184,27195114,14222536,19743731,17344200,37836873,64019328,64929124,237634998,25073877,21447363,834095274,14629315,16638685,14230524,26588937,255388236,352701848,759251,807095,28035260,450397702,1462317296,1396161031,119509520,17461978,23375688,89423854,13049362,476234589,79293791,262749118,176566242,16548023,24036264,137478201,23065354,428333,157140968",
  "followers_of_users": "",
  "account_id": "18ce53xk53i",
  "broad_keywords": ""
}

Since we’re attempting to update targeting scope via similar_to_followers_of_users (and not followers_of_users), the response message received doesn’t seem appropriate for our request. Any suggestions on how to understand this response message?


#2

Update: As of yesterday, I’m still getting this error message


#3

I can confirm that removing the "followers_of_users": "", key-value pair does not remedy this issue.


#4

Hi @frewsxcv. In the field similar_to_followers_of_users there must be only user ids for promotable users of the twitter ad acount, that is the users returned by https://dev.twitter.com/ads/reference/get/accounts/%3Aaccount_id/promotable_users. Now, only the current account’s user can be used.


#5

Unlike followers_of_users, the documentation does not mention that about similar_to_followers_of_users.

Did this functionality change recently? We had been successfully making this API call for a while before October 19th, and it’s not mentioned in the recent changes page.


#6

@frewsxcv it’s not a recent change, but we should clarify in the docs where this is a requirement and where it is not. If this was working before, it shouldn’t have been. You’re only allowed to use user IDs from your account’s promotable users with these targeting types.

Correction: I was confusing this with followers_of_users which does have this restriction. The targeting type similar_to_followers_of_users definitely does not have this same restriction for promotable users only.


#7

We just looked into this more. We have two campaigns (and associated line items we’re working with). Given a set of users we are able to successfully update the targeting criteria of one but not the other (returning the error above). What should we make of this?

"Only promotable users for this account can have their followers directly targeted"

Isn’t this error message incorrect since we’re targeting ‘similar followers’ and not our ‘followers’?


#8

@frewsxcv you shouldn’t see this message when attempting to target similar_to_followers_of_users since this same restriction is not present on this targeting type.

Are you still actively seeing this issue? I’m currently unable to reproduce the behavior you’re describing at it appears to be working as designed.

https://gist.github.com/brandonblack/0117360a85660ab88412


#9

@brandonmblack I just emailed you API query examples (with potentially sensitive data) that demonstrate this error. Let me know if you didn’t receive the email or if you need any clarification. Thanks!


#10

@frewsxcv log data doesn’t help here since the issue is likely in your implementation. As I showed in my last post, I cannot reproduce the issue outside of your implementation.

We need to see raw HTTP requests. Can you reproduce this issue with this campaign using twurl using the --trace flag? Please do so and post the output here before we go any further (there’s nothing sensitive, it’s all already in this thread)


#11

Can you reproduce this issue with this campaign using twurl using the --trace flag

Below you can find my usage of twurl to replicate this issue:

$ twurl --version
0.9.3
$ twurl --trace -H ads-api.twitter.com -X PUT "/0/accounts/18ce53v01dt/targeting_criteria" -d "similar_to_followers_of_users=27260086" -d "line_item_id=3h53x"
opening connection to ads-api.twitter.com:443...
opened
starting SSL for ads-api.twitter.com:443...
SSL established
<- "PUT /0/accounts/18ce53v01dt/targeting_criteria HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nUser-Agent: OAuth gem v0.4.7\r\nContent-Type: application/x-www-form-urlencoded\r\nAuthorization: OAuth oauth_consumer_key=\"khLsdqXTm9WcVBv4zBRwGHDmP\", oauth_nonce=\"b5iDYu3LMnVBZjap18ooLH2iI0cD5bSIO4mekmiPsYQ\", oauth_signature=\"yEfWmfxoDe4j47bZ81FAwCOP70I%3D\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1447693099\", oauth_token=\"605804404-QjmIYIwLwOyXqUDDp6mBrql2qoD6rQww2DeA3ALQ\", oauth_version=\"1.0\"\r\nConnection: close\r\nHost: ads-api.twitter.com\r\nContent-Length: 57\r\n\r\n"
<- "similar_to_followers_of_users=27260086&line_item_id=3h53x"
-> "HTTP/1.1 400 Bad Request\r\n"
-> "connection: close\r\n"
-> "content-disposition: attachment; filename=json.json\r\n"
-> "content-encoding: gzip\r\n"
-> "content-length: 239\r\n"
-> "content-type: application/json;charset=utf-8\r\n"
-> "date: Mon, 16 Nov 2015 16:58:20 GMT\r\n"
-> "server: tsa_a\r\n"
-> "set-cookie: guest_id=v1%3A144769310034396351; Domain=.twitter.com; Path=/; Expires=Wed, 15-Nov-2017 16:58:20 UTC\r\n"
-> "strict-transport-security: max-age=631138519\r\n"
-> "x-access-level: read-write\r\n"
-> "x-connection-hash: a1cbc8395ea1a3a0a87645fe9797e93b\r\n"
-> "x-content-type-options: nosniff\r\n"
-> "x-frame-options: SAMEORIGIN\r\n"
-> "x-rate-limit-limit: 300\r\n"
-> "x-rate-limit-remaining: 300\r\n"
-> "x-rate-limit-reset: 1447693160\r\n"
-> "x-response-time: 432\r\n"
-> "x-runtime: 0.422336\r\n"
-> "x-transaction: 2ccbc07d7accdb33\r\n"
-> "x-tsa-request-body-time: 0\r\n"
-> "x-xss-protection: 1; mode=block\r\n"
-> "\r\n"
reading 239 bytes...
-> ""
-> "\x1F\x8B\b\x00\x00\x00\x00\x00\x00\x00<\x8E\xCBj\xC30\x10E\x7FE\xCC:\v'&i\xF0\xCE\xD0,\x02}\x84P\xBA)EL\xE4\x89-\x90\xACd4v[\x8C\xFF\xBDR\r\xDD\r\xF7q\xEEL@\xCC\x81#T\x1F\x13\x98\xD0\x10Tp|y\xAF\x9F\x8E\x8F\xFAT\x9F\xEB\xE7\xC3\xDB\xE1\f+\xF0\x14#\xB6\xD9}\xED\xDD\x8F\xBAq\xF0A\xF0\xE2H\r\x918\xAAk`%\x9D\x8D\n\x8D\tC/\xCA`\xAF:\x1C)\xA9d9\xF9\xCE\x85\xAF\x9Cl,\x93\x91\xC4\x10\xE4\x96\x84\x9ADG\x11\xB6\x97A2\x7F\x91m\xDF\xEA\x11\xDD@0\x7F\xAE\x80\xE9>P\x14\xA8&\xB8!\xA3\x8F\xF9r\xB6'm\x85\xBC\xB6M\xEA\x95\xDD\xB6\xFCN\xACh\xBDu\xC8Z\x82\xFE\x1F\xD5\xE1\xAA\xFF\xFEL\xB9\xCD\xC3fW\x14\xFB]\x9E]~]\xFA\xEB\xBD\xA1m9\x16\xEBF`\x9E\xE7_\x00\x00\x00\xFF\xFF\x03\x00\xA5\xE9W\x00\x19\x01\x00\x00"
{"errors":[{"code":"INVALID_PARAMETER","message":"Only promotable users for this account can have their followers directly targeted","attribute":"targeting_value"}],"request":{"params":{"line_item_id":"3h53x","similar_to_followers_of_users":"27260086","account_id":"18ce53v01dt"}}}read 239 bytes
Conn closed

there’s nothing sensitive, it’s all already in this thread

In the link I sent to your email, one of our client’s names appears in cleartext, which we don’t necessarily want to reveal publicly.

Thanks for help and patience, we really appreciate it! :smiley:


#12

@frewsxcv thanks for the thorough response.

I’m going to escalate this internally. I’m still unable to reproduce the issue here at all with other line items, but I suspect this may be a bug in the API specific to this particular line item. This doesn’t seem to be impacting any other line items.

Hold tight and let me dig into this for a bit.


#14

Hey Brandon, have there been any updates on this issue? We’re still encountering it. Thanks!


#15

Hi,

We are experiencing the same problem, getting the error using both the ‘followers_of_users’ and ‘similar_to_folowers_of_users’ targeting parameters:

{‘message’: ‘User XXXXXX is not promotable user for this account, so cannot have the followers directly targeted’, ‘attribute’: ‘targeting_value’, ‘code’: ‘INVALID_PARAMETER’}

Any advice on how to resolve would be very helpful.

Thanks,
Eamonn


#16

Hello folks,

We have fixed an issue related to setting SIMILAR_TO_FOLLOWERS_OF_USER on targeting_criteria where in some instances it was incorrectly throwing validation errors. Please let us know if you still see problems after today by posting a new thread.

Thanks,

John


#17

The previously problematic campaigns are syncing now. Thanks!


#18