BubbleShare Upload API
How to upload photos to BubbleShare from your application
BubbleShare utilizes a multipart HTTP POST system to receive uploads, much like the way your browser submits files to remote servers. External applications wishing to upload files to BubbleShare should perform the following tasks. For more details regarding the standard you can visit: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.2Authenticate the User
As of the March 2007 release of BubbleShare, all uploads MUST be authenticated.
Make a POST request to http://www.bubbleshare.com/api/login with the following key-value pairs (parameters):uploaderThe response is in XML format. The items you care about most are:
the name of your application version
optional, the version of your application email
the e-mail address that the user has registered with BubbleShare caption
optional title for the picture
<success>true</success> <user> <id>1</id> <authKey>a8e1eda98fc</authKey> </user>
If you have passed the correct information, success must contain the word "true". Keep note of the User ID and User AuthKey for the following steps.
Note, it's a good idea to provide the user with a link to register on BubbleShare, in case they have not done so already:
http://www.bubbleshare.com/users/new
Upload Files
The POST body consists of a number of key-value pairs (parameters) and a BASE 64 encoded representation of the image file you wish to upload. All text must be properly encoded to be URL safe. Here is the list of parameters:user_key
This is made up of the userID.userAuthKey (User ID and User AuthKey separated by a period). This would be 1.a8e1eda98fc from the above example. uploader
the name of your application session_id
a unique series of characters and numbers (Max 32 characters) transaction_id
same as the session_id (for now) picture
the image file caption
optional title for the picture
Make a POST request to:
http://www.bubbleshare.com/api/upload
You can repeat this step as many times as you want (with the same transaction_id and session_id) to add multiple photos to an album.
Create the Album
After you are done uploading, you must make another HTTP POST request to the following:
to let the system know that it should create the album:
http://www.bubbleshare.com/api/create_album
user_key
This is made up of the userID.userAuthKey uploader
Your application's name album_name
Optional name of the album session_id
Same as above session_id transaction_id
Same as the session_id
