API

Add Video

You can upload videos to Videobin with a simple HTTP POST request.
Send a multipart POST request to http://videobin.org/add
videoFile(required)video to upload
title(optional)title of video
description(optional)description of video
email(optional)if provided users are able to delete videos by logging in with that email
api(optional)set to 1 to get text/plain response with url to video page instead of redirect
bin(optional)id of bin to post video to. This only works if you send the right vbk cookie
In order to edit or delete the video you have to save the cookie vbk and send it with your next requests.

Edit video

Send a multipart POST request to http://videobin.org/binID/videoId/edit
This only works if you send the right vbk cookie with your requests.
titlechange title of video
descriptionchange description of video
binTitlechange title of bin
writeableset to 1 to allow others to edit title/description

User Settings

Send a multipart POST request to http://videobin.org/settings
This only works if you send the right vbk cookie with your requests.
emailemail of user, can be used to recover session cookie

Examples

CURL

You can use curl to upload videos:
    curl -F"api=1" -F"email=you@example.com" -F"videoFile=@video.ogv" http://videobin.org/add
    

Python

Java

You will need:

HttpClient client = new DefaultHttpClient();
client.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1);

URI url = null;
try {
    url = new URI("http://videobin.org/add");
} catch (URISyntaxException e) {
    e.printStackTrace();
}
HttpPost        post   = new HttpPost( url );
MultipartEntity entity = new MultipartEntity( HttpMultipartMode.BROWSER_COMPATIBLE );

File file = new File(latestTempVideoFile);
entity.addPart("videoFile", new FileBody(file));

try {
    entity.addPart( "api", new StringBody( "1", "text/plain",Charset.forName( "UTF-8" )));
} catch (IllegalCharsetNameException e) {
    e.printStackTrace();
} catch (UnsupportedCharsetException e) {
    e.printStackTrace();
} catch (UnsupportedEncodingException e) {
    e.printStackTrace();
}

post.setEntity( entity );

// get response
String response = null;
try {
    response = EntityUtils.toString( client.execute( post ).getEntity(), "UTF-8" );
} catch (ParseException e) {
    e.printStackTrace();
} catch (ClientProtocolException e) {
    e.printStackTrace();
} catch (IOException e) {
    e.printStackTrace();
}

client.getConnectionManager().shutdown();

Log.d(TAG, " got back " + response); 
    
home | help | find your video | about | api | code | talk to us