Note! This documentation describes how to post the text via Twishort API. If you need a way to get the text, please contact us.
Twishort API allows you to post data to the Twishort service before sending the post to Twitter.
It can be used by Twitter applications to post the long text to Twishort, and receive a tweet-sized message with a link to the complete post.
We use OAuth Echo to ensure valid requests. More about OAuth Echo at dev.twitter.com/pages/oauth_echo.
X-Auth-Service-Provider (required)
https://api.twitter.com/1.1/account/verify_credentials.json
X-Verify-Credentials-Authorization (required)
OAuth realm="http://api.twitter.com/", oauth_consumer_key="GDdmIQH6jhtmLUypg82g", oauth_signature_method="HMAC-SHA1", oauth_token="819797-Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw", oauth_timestamp="1272325550", oauth_nonce="oElnnMTQIZvqvlfXM56aBLAf5noGD0AQR3Fmi7Q6Y", oauth_version="1.0", oauth_signature="yOahq5m0YjDDjfjxHaXEsW9D%2BX0%3D"
api_key (required)
Your Twishort API Key.
text (required)
Text to post.
200 OK header, the text was posted successfully.
200 OK
{
"id":"cbbbc",
"url":"http://twishort.com/cbbbc",
"created_at":"Mon, 10 Dec 2012 12:07:28 +0000",
"text_to_tweet":"text for the tweet… http://twishort.com/cbbbc",
"user":
{
"id":835657794,
"id_str":"835657794",
"screen_name":"testuser"
}
}
400 Bad Request,
403 Forbidden,
404 Not Found,
etc.
403 Forbidden
{
"errors":[
{
"message":"Invalid API Key",
"code":131
}
]
}
400 Bad Request
{
"errors":[
{
"message":"Missing headers: No 'X-Verify-Credentials-Authorization' provided",
"code":102
},
{
"message":"Missing parameters: No 'api_key' provided",
"code":111
}
]
}
Once a message has been successfully posted to Twishort and Twitter, it would be really useful to send back the Twitter ID for the message. This will allow users to manage their Twishort posts and delete not only the Twishort post, but also the tweet associated with it. It will also makes replies much more effective.
URL
http://api.twishort.com/1.1/update_ids.json
Headers
The same as post.
api_key (required)
Twishort API Key.
id (required)
id of the Twishort post (e.g. cbbbc).
tweet_id (required)
id of the tweet you've just posted to Twitter.
reply_to_tweet_id (optional)
in_reply_to_status_id of the tweet you've just posted to Twitter.
reply_to_user_id (optional)
in_reply_to_user_id of the tweet you've just posted to Twitter.
API version 1.0 (documentation from old site) is deprecated now. It will return 400 Bad Request.
If you still use it, we highly recommend update your code to API version 1.1 (this page).
Feel free to contact us if you have any questions.