• Home
  • Upload
  • Public Timeline
  • Search
Logo
API DOCUMENTATION

- METHOD: uploadAndPost

- METHOD: upload

- Error codes

- Image Thumbnails



METHOD: http://ctr.lv/rest/api/uploadAndPost
Use this method to upload an image to CtrlV
and to send it as a status update to
Twitter.

Fields to post in
(post data should be formatted as multipart/form-data):
- userfile (required) - Binary image data
- twitterusername (required) - Twitter username
- twitterpassword (required) - Twitter password
- caption (optional) - Image caption
- message (optional) - Message to post to twitter.

Sample response:
<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
<fileType>1111</fileType>
<userName>11111</userName>
<mediaId>abc123</mediaId>
<media>>abc123</media>
<mediaName>abc123</mediaName>
<mediaURL>http://ctr.lv/abc123</mediaURL>
</response>


Sample error response:
<?xml version="1.0" encoding="UTF-8"?>
<response status=" error" >
< errorMessage> </errorMessage>
< errorCode> </errorCode>
</response>

Error codes and their descriptions:
1001 - Invalid twitter username or password
1002 - Image not found
1003 - Invalid image type
1004 - Image larger than 4MB
Image thumbnails:


Use the following URL structure to add Ctrlv.us
thumbnails into your
app: http://ctr.lv/rest/small/thumb/ImageID
http://ctr.lv/rest/medium/thumb/ImageID
http://ctr.lv/ImageID/full
Image ID: this is the ID of the Ctrlv.us photo
Example: http://ctr.lv/rest/small/thumb/1e10q



_home    _twitter     _API    _FAQ    _terms    _contact

 

©2010 Ctrl-V. All rights reserved.