API Specification
Description
Uploads any of the media types supported by Twitizer. Optionally sends a
Twitter update.
URL
- http://twitizer.com/upload.format: Upload to Twitizer without Twitter update
- http://twitizer.com/uploadAndPost.format: Upload to Twitizer with Twitter update
Available Response Formats
XML, JSON
HTTP Method
POST
Requires Authentication
True
Headers
Used for authentication via OAuth pass-through. Currently only oauth_token is
used. Towards Twitter the rest is re-generated.
- HTTP header: X-Verify-Credentials-Authorization
- Content: OAuth realm="http://api.twitter.com/", oauth_consumer_key="",
oauth_signature_method="HMAC-SHA1", oauth_token="", oauth_timestamp="",
oauth_nonce="", oauth_version="1.0", oauth_signature=""
Parameters
alias can be used if OAuth pass-through is not used. In this case Twitizer
handles OAuth for the client. The alias to use is shown at the top of the page
after the user logs in.
- key (required): The developer key (requested from Abiro)
- alias (optional; see above): The user's unique Twitizer alias
- message (required): Text message in UTF-8
- geo_latitude (optional): Latitude in decimal format
- geo_longitude (optional): Longitude in decimal format
- description (optional): Text description in UTF-8
- media (optional): File in file upload format
Responses
HTTP Response Codes
- 200: Everything went well. Used together with XML or JSON
response.
- 400: Missing parameter(s).
- 401: Unauthorized (invalid OAuth packet or invalid alias).
Template XML Response
<?xml version="1.0" encoding="UTF-8"?>
<media>
<id>[landing page code]</id>
<text>[text message]</text>
<url>[landing page URL]</url>
<timestamp>[in ISO date/time format]</timestamp>
<user>
<screen_name>[Twitter screen name]</screen_name>
</user>
</media>
Template JSON Response
{
"id" : "[landing page code]",
"text" : "[text message]",
"url" : "[landing page URL]",
"timestamp" : "[in ISO date/time format]",
"user" : {
"screen_name" : "[Twitter screen name]"
}
}
|