Request/response below, I’m not expecting an internal error, I’m expecting a promotable tweet to be created
This process has been working for us for months without issue.
twurl -t -H ads-api.twitter.com /1/accounts//tweet -d “video_id=771665552129466370” -d "status=Testing"
opening connection to ads-api.twitter.com:443…
opened
starting SSL for ads-api.twitter.com:443…
SSL established
<- “POST /1/accounts/18ce53w2m7t/tweet 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.5.1\r\nContent-Type: application/x-www-form-urlencoded\r\nAuthorization: OAuth oauth_consumer_key=“QXJ7vKhM8OZcLNckIomX8KPCT”, oauth_nonce=“s9AowAgAFBT00Elm6UAMOLncf9rhiM53GPg92oGHg”, oauth_signature=“CeIDStt%2FWN%2BCyLQhxmwp%2B82Uxdg%3D”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1472854856”, oauth_token=“2349222036-US1F6JHOT483ODDnVDwUn4K99jj9fXfkATCpjRu”, oauth_version=“1.0”\r\nConnection: close\r\nHost: ads-api.twitter.com\r\nContent-Length: 42\r\n\r\n”
<- “video_id=771665552129466370&status=Testing”
-> “HTTP/1.1 500 Internal Server Error\r\n”
-> “connection: close\r\n”
-> “content-disposition: attachment; filename=json.json\r\n”
-> “content-encoding: gzip\r\n”
-> “content-length: 109\r\n”
-> “content-type: application/json;charset=utf-8\r\n”
-> “date: Fri, 02 Sep 2016 22:20:58 GMT\r\n”
-> “server: tsa_l\r\n”
-> “set-cookie: guest_id=v1%3A147285485875889824; Domain=.twitter.com; Path=/; Expires=Sun, 02-Sep-2018 22:20:58 UTC\r\n”
-> “strict-transport-security: max-age=631138519\r\n”
-> “x-access-level: read-write\r\n”
-> “x-api-version: 1.0\r\n”
-> “x-connection-hash: 0ee200b506206a6028f7f78a6e7f1068\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: 1472854903\r\n”
-> “x-response-time: 268\r\n”
-> “x-runtime: 0.102693\r\n”
-> “x-transaction: 009df14e000bb56e\r\n”
-> “x-tsa-request-body-time: 150\r\n”
-> “x-xss-protection: 1; mode=block\r\n”
-> "\r\n"
reading 109 bytes…
-> “”
-> “\x1F\x8B\b\x00\x00\x00\x00\x00\x00\x00\xAAVJ-*\xCA/*V\xB2\x8A\xAEVJ\xCEOIU\xB2R\xF2\xF4\vq\r\xF2s\xF4\x89w\r\n\xF2\x0FR\xD2Q\xCAM-.NL\aK\xE5\x95\xA4\x16\xE5%\xE6(\xB8\x82t)\xD5\xC6\xEA(\x15\xA5\x16\x96\xA6\x16\x97(YU+\x15$\x16%\xE6\x02\x8D\xAA\xAE\xAD\xAD\x05\x00\x00\x00\xFF\xFF\x03\x00\x14\xCE\xF7\xFEY\x00\x00\x00”
{“errors”:[{“code”:“INTERNAL_ERROR”,“message”:“Internal Error”}],“request”:{“params”:{}}}read 109 bytes
Conn close
This the the kind of response we have been getting and are expecting
{
“data_type”: “status”,
“data”: {
“created_at”: “Thu Aug 25 23:51:49 +0000 2016”,
“id”: 768959094254284800,
“id_str”: “768959094254284800”,
“text”: “Tweet status\nhttps://t.co/GmZ3iG0uO5”,
“truncated”: false,
“entities”: {
“hashtags”: [],
“symbols”: [],
“user_mentions”: [],
“urls”: [
{
“url”: “https://t.co/GmZ3iG0uO5”,
“expanded_url”: “https://amp.twimg.com/v/3d208728-7817-49af-aef2-e646421d9ed2”,
“display_url”: “amp.twimg.com/v/3d208728-781…”,
“indices”: [
41,
64
]
}
]
},
“source”: “<a href=“http://twitter.com” rel=“nofollow”>Twitter Web Client”,
“in_reply_to_status_id”: null,
“in_reply_to_status_id_str”: null,
“in_reply_to_user_id”: null,
“in_reply_to_user_id_str”: null,
“in_reply_to_screen_name”: null,
“user”: {
“id”: 2349222036,
“id_str”: “2349222036”,
“name”: “Unscriptd”,
“screen_name”: “UnscriptdSport”,
“location”: “Worldwide”,
“url”: “http://Unscriptd.com”,
“description”: “Unscriptd powers the personal video of the world’s best athletes.”,
“protected”: false,
“followers_count”: 0,
“friends_count”: 0,
“listed_count”: 0,
“created_at”: “Mon Feb 17 23:40:43 +0000 2014”,
“favourites_count”: 0,
“utc_offset”: 36000,
“time_zone”: “Brisbane”,
“geo_enabled”: false,
“verified”: false,
“statuses_count”: 0,
“lang”: “en”,
“contributors_enabled”: false,
“is_translator”: false,
“is_translation_enabled”: false,
“profile_background_color”: “90B93E”,
“profile_background_image_url”: “http://abs.twimg.com/images/themes/theme14/bg.gif”,
“profile_background_image_url_https”: “https://abs.twimg.com/images/themes/theme14/bg.gif”,
“profile_background_tile”: false,
“profile_image_url”: “http://pbs.twimg.com/profile_images/666838638819344384/1y8qLZFs_normal.jpg”,
“profile_image_url_https”: “https://pbs.twimg.com/profile_images/666838638819344384/1y8qLZFs_normal.jpg”,
“profile_banner_url”: “https://pbs.twimg.com/profile_banners/2349222036/1447823574”,
“profile_link_color”: “90B93E”,
“profile_sidebar_border_color”: “FFFFFF”,
“profile_sidebar_fill_color”: “DDEEF6”,
“profile_text_color”: “333333”,
“profile_use_background_image”: false,
“has_extended_profile”: false,
“default_profile”: false,
“default_profile_image”: false,
“following”: null,
“follow_request_sent”: null,
“notifications”: null
},
“geo”: null,
“coordinates”: null,
“place”: null,
“contributors”: null,
“retweet_count”: 0,
“favorite_count”: 0,
“favorited”: false,
“retweeted”: false,
“possibly_sensitive”: false,
“scopes”: {
“followers”: false
},
“lang”: “en”
},
“request”: {
“params”: {
“status”: “Status of tweet here”,
“video_id”: “768958670109483009”,
“account_id”: “our account id”
}
}
}