Use our API to upload and share multimedia on twitlens.com via desktop clients, websites, or other applications.
HTTP POST Method
http://api.twitlens.com/
Accepts data as multipart/form-data. Transmit up to 10 files < 25MB each.
Input Fields
| key |
Your unique API user key. Request one here: admin@twitlens.com |
| clientname |
Your service/business name. It will not be displayed anywhere on the site but is required for authorization. |
| fileN |
Media to upload where N is an integer 0 - 10. If the file extention doesn't match the file type, please be sure to set the appropriate content/mime type. |
| titleN |
Title for fileN where N is an integer 0 - 10 (optional) |
| tags |
comma separated list of key-words to attach to all files (optional) |
| toly |
flag to indicate you want us to generate a tiny url using http://0.ly (optional) - pass 1 |
| |
| Twitter related fields (must supply all 4 if you wish to tweet) |
| post |
flag to indicate you wish to tweet (pass 1) |
| twituser |
Twitter username |
| twitpass |
Twitter password |
| twitmessage |
Personal message to tweet. -note: link to 1st file will automatically be appended to this message |
XML Response
<rsp status="STATUS">
<posted>POSTED</posted>
<posterror>POST_ERROR</posterror>
<processed>
<file0>
<name>some_image.jpg</name>
<url>http://twitlens.com/?abc</url>
</file0>
<file1>
<name>another_image.jpg</name>
<url>http://twitlens.com/?xyz</url>
</file1>
</processed>
<failed>
<file2>
<name>some_image.junk</name>
<error>unknown file type</error>
</file2>
</failed>
<error>GENERAL_ERROR</error>
</rsp>
| STATUS |
ok or error |
| POSTED |
yes or no |
| POST_ERROR |
error message describing failed tweet (if tweet failed) |
| processed |
list of successfully processed files (if any) |
| failed |
list of files that failed to upload properly and the file specific error (if any) |
| GENERAL_ERROR |
error message not specific to any file. ex: invalid key |