TwitrPix provides a set of API tools to allow developers to integrate TwitrPix into their applications. These APIs may change and new functionality added in the future.
If you have special needs or would like to be notified when our API's are updated, please drop us a note at hi@twitrpix.com.
All requests must post data as multipart/form-data unless sending media as base64 encoded.
- UTF-8 encoded
- Successes have a stat of "ok"
- Errors have a stat of "fail"
http://api.twitrpix.com/uploadAndPost
Use this method to upload an image to Twitrpix and send a status update to Twitter with the media link.
Post data (must be formatted as multipart/form-data):
<?xml version="1.0" encoding="UTF-8"?> <rsp status="ok"> <statusid>1111</statusid> <userid>11111</userid> <mediaid>abc123</mediaid> <mediaurl>http://twitrpix.com/abc123</mediaurl> </rsp>
<?xml version="1.0" encoding="UTF-8"?> <rsp stat="fail"> <err code="1001" msg="Invalid Twitter username or password" /> </rsp>
1000 - Unknown error 1001 - Invalid Twitter username or password 1002 - Image not attached 1003 - Image not supported 1004 - Image exceeds maximum size
http://api.twitrpix.com/upload
Use this method to upload an image to Twitrpix only.
Post data (must be formatted as multipart/form-data):
<?xml version="1.0" encoding="UTF-8"?> <rsp status="ok"> <statusid></statusid> <userid>11111</userid> <mediaid>abc123</mediaid> <mediaurl>http://twitrpix.com/abc123</mediaurl> </rsp>
<?xml version="1.0" encoding="UTF-8"?> <rsp stat="fail"> <err code="1001" msg="Invalid Twitter username or password" /> </rsp>
1000 - Unknown error 1001 - Invalid Twitter username or password 1002 - Image not attached 1003 - Image not supported 1004 - Image exceeds maximum size
http://img.twitrpix.com/<size>/<media id>
Use this method to show TwitrPix images within your app. By parsing a TwitrPix URL within a status update, you can extract the media id and prepend the media URL to retrieve the image.
Sizes:
thumb - thumbnail
full - fullsize image
ie. http://twitrpix.com/6o - the media id
Obtain the thumbnail by using: http://img.twitrpix.com/thumb/6o
The full size image can be retrieved by: http://img.twitrpix.com/full/6o
Note: Thumbnails and fullsize images should link back to the photo detail page on TwitrPix or a link to the photo detail page provided to your end user.
http://api.twitrpix.com/ping
Use this method to test if the API system is up or in maintenance mode. No request parameters.
<?xml version="1.0" encoding="UTF-8"?> <rsp status="ok"> <message>pong</message> </rsp>
<?xml version="1.0" encoding="UTF-8"?> <rsp status="ok"> <message>maintenance</message> </rsp>