API Specification

Description

Uploads any of the media types supported by Twitizer (most image and audio formats). Optionally sends a Twitter update.

Use of this API requires a developer-specific developer key ordered from Abiro.

Uploading requires that the user in question is already registered at Twitizer. More below.

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

format above states what format the response should be in, either json or xml. We recommend 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=""

Please note that a user must have registered via Twitizer, and that way set up a Twitizer account, before that user's credentials can be used via the API.

Parameters

alias can be used instead of OAuth pass-through. 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. The response data is valid.
  • 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]"
    }
}