For the GET promoted_tweets endpoint, the only inputs for IDs that are accepted are line_item ids. If you want to call for a specific promoted tweet, you can call with the promoted_tweet_id. Note that the promoted_tweet_id is an alpha-numeric identifier that is based on the unique combination of the line_item_id and the tweet_id. That is auto-generated and not something you can derive on your own.
Sample of the GET promoted_tweets query:
$ twurl -H ads-api.twitter.com "/1/accounts/abc1/promoted_tweets?count=3" |jq .
{
"request": {
"params": {
"count": 3,
"account_id": "abc1"
}
},
"data": [
{
"line_item_id": "vrv9",
"display_properties": [],
"id": "22cs7",
"paused": false,
"created_at": "2013-10-01T22:37:29Z",
"updated_at": "2014-10-24T19:32:30Z",
"approval_status": "ACCEPTED",
"tweet_id": "372218875217059840",
"deleted": false
},
{
"line_item_id": "vxdm",
"display_properties": [],
"id": "22vht",
"paused": false,
"created_at": "2013-10-04T23:49:09Z",
"updated_at": "2014-10-24T19:32:30Z",
"approval_status": "ACCEPTED",
"tweet_id": "382871353973411842",
"deleted": false
},
{
"line_item_id": "vxdw",
"display_properties": [],
"id": "22vi9",
"paused": false,
"created_at": "2013-10-04T23:55:47Z",
"updated_at": "2014-10-24T19:32:30Z",
"approval_status": "ACCEPTED",
"tweet_id": "382871353973411842",
"deleted": false
}
],
"data_type": "promoted_tweet",
"total_count": 53,
"next_cursor": "8rubbk9a8"
}
Sample of a single GET promoted_tweet query:
$ twurl -H ads-api.twitter.com "/1/accounts/abc1/promoted_tweets/k18k5" |jq .
{
"request": {
"params": {
"promoted_tweet_id": "k18k5",
"account_id": "abc1"
}
},
"data_type": "promoted_tweet",
"data": {
"line_item_id": "28gz1",
"display_properties": [],
"id": "k18k5",
"paused": false,
"created_at": "2016-01-22T02:03:57Z",
"updated_at": "2016-01-22T15:38:40Z",
"approval_status": "ACCEPTED",
"tweet_id": "660187717414711296",
"deleted": false
}
}
If you’re getting an error on the latter call, then the promoted_tweet_id is either deleted and you should add the with_deleted=true param to your query, or it does not exist on that ads account.