REST API Documentation
API v1 » upload_and_create_gift (POST)
Description
This API endpoint is used for uploading and creating a gift on gwitr. If you receive an HTTP 200 OK header, you can assume the gift was successfully uploaded and created. Please note that the message posted together with the gift will be publicly visible.
URL
http://www.gwitr.com/api/1/upload_and_create_gift.format
Available Formats
XML, JSON
HTTP Method
POST
Requires Authentication
Yes
Headers
X-Verify-Credentials-Authorization (Required)
Header Example
OAuth realm="http://api.twitter.com/",
oauth_consumer_key="GEdtIQH8jhtmLUyph82g",
oauth_signature_method="HMAC-SHA1",
oauth_token="414767-Jxq8aYUDRmykzVKwgoBhXSs67TEa3ruc4GJC2rWimw",
oauth_timestamp="1272325550",
oauth_nonce="oElnnwTQIZbqvlyXM58aBLAf5noGD0AQR8Fma7Q6Y",
oauth_version="1.0",
oauth_signature="U2obRfE7Rs9J1kefTGwuvLJdsbo%3D"
X-Auth-Service-Provider (Required)
https://api.twitter.com/1/account/verify_credentials.json
Rate Limited
Yes
Parameters
- api_key (Required) : Your API key
- gift_image (Required. Binary Image Data) :
The image to upload (Only jpg, gif (including animated gif) and png images not exceeding 1MB are accepted. Moreover, images must have a minimum size of 100px X 100px and should not be larger than 1000px X 1000px.) - gift_box_id (Required) :
The ID of the gift box (In case this is an empty string, the default orange gift box (id=4) will be used)
You can download the gift box thumbnails here. You can use these when integrating gwitr in your own application. - recipients (Required. Must be UTF-8 encoded) :
List of Twitter ids to which the gift and message needs to be sent. Each id must be separated with a comma (e.g. @krishleyp,@gwitr,@twitter). In case the user wants to post the gift and message to all his/her followers, leave this string empty. (Should not exceed 90 characters) - message (Required. Must be UTF-8 encoded): The message to be sent together with the gift (Should not exceed 140 characters)

Responses
Sample XML Response
<?xml version="1.0" encoding="UTF-8"?>
<gift>
<id>8t</id>
<url>http://www.gwitr.com/8t</url>
</gift>
Sample JSON Response
{
"gift":
[
{
"id":"8t",
"url":"http://www.gwitr.com/8t"
}
]
}
