Overview
The Posterous Twitter API lets you upload photos to a Posterous site. It is used with normal HTTP POST requests. Post data should be formatted as multipart/form-data. This API is a drop-in replacement for the Twitpic API.
The API uses Twitter's OAuth Echo method to authenticate the identity of a Twitter user. Click here for more information about OAuth Echo authentication.%>.
If the Twitter user is registered on Posterous, it will post to their default Posterous site. If the user is not on Posterous, we will create a new site for them. The media parameter can be an array of media. This includes images, audio, video, and common document formats.
Upload
URL
- http://posterous.com/api2/upload.format
- https://posterous.com/api2/upload.format
Formats
- json
- xml
Fields
- "media" - Optional. File data for single file.
- "media[]" - Optional. File data for multiple file upload. Can be specified multiple times.
- "message" - Optional. Title of post
- "body" - Optional. Body of post
- "source" - Optional. The name of your application or website
- "sourceLink" - Optional. Link to your application or website
Headers
There are two required headers for OAuth Echo:
- X-Auth-Service-Provider: https://api.twitter.com/1/account/verify_credentials.json
- X-Verify-Credentials-Authorization: Should be the signed OAuth "Authorization" header typically used to call the verify_credentials.json endpoint
Response
Sample JSON Response
Sample XML Response:
Sample CURL Command
Post.ly Overview
The Post.ly API lets you interact with Post.ly urls.
URL
- http://posterous.com/api/getpost
- "id" - Required. Post.ly shortcode. (Example: 123abc in http://post.ly/123abc)