Hey Developers,
[[posterous-content:ccti8ecB0QBTuGuSnBao]]
We decided to provide our API which was firstly intended only for internal use for each other. So our API is very basic, not so elegant. Basically to work with the API is very simple. You just have to send some post request to the API and the results will be given in JSON. To test and play with the API we provided some html test forms, because we think that everyone know how html forms are working. For testing propose we have prepared a sandbox version of movio. Please use that for testing and not the live system. You can find the api it under the URL "http://api.sandbox.mov.io/movioapi.php“. The sandbox portal (where you can find your uploaded videos can be found under “http://sandbox.mov.io“.
We are currently offering just a few commands, the advantage is that you don't have to learn so much ;-). Anyway we know, that this is not enough for all purposes and we want to improve and extend it shortly. Currently it's only possible to get back json back in further versions maybe XML will be offered too.
[[posterous-content:ccti8ecB0QBTuGuSnBao]]
Function: auth
Methode GET or POST
http://api.sandbox.mov.io/test_form_auth.php Parameters:
mode:auth
username: the twitter username
password: the twitter password
service: currently only the twitter service is available in next version Facebook, StudiVZ, SchuelerVZ, MeinVZ will be available, too
appkey: you get this key when you register your application
Example:
We prepared an example form to you:
http://api.sandbox.mov.io/test_form_auth.php Results:
Success:
{"movio_response":{"status":{"resultcode":"004","errorstring":"Username and password correct"}}}
Fail:
{"movio_response":{"status":{"errorcode":"001","errorstring":"Username or password incorrect"}}}
Function: upload_video Methode: POST
http://api.sandbox.mov.io/test_form_auth.php The method upload_video is used to upload videos to the servers. After uploading the videos are not instandly online. Firtstly you have to call settext.
Parameters:
mode:upload_video
username: the twitter username
password: the twitter password
streamid: this is a random UUID (http://en.wikipedia.org/wiki/Universally_Unique_Identifier). For each upload process you should use the same for the upload function and settext function.
Your application should generate it randomly following the this rules:
- Number of characters: 36 (32 digits and 4 hyphens)
- 8 digits, one hyphen, 4 digits, one hyphen, 4 digits, one hyphen,4 digits, one hyphen, 12 digits
Example: 550e8400-e29b-41d4-a716-446655440000
service: currently only the twitter service is available in next version Facebook, StudiVZ, SchuelerVZ, MeinVZ will be available, too
appkey: you get this key when you register your application
Example:
We prepared an example form to you:
http://api.sandbox.mov.io/test_form_upload.php Result:
Success:
{"movio_response":{"status":{"errorcode":"0","errorstring":"OK"}}}
Fail:
{"movio_response":{"status":{"errorcode":"001","errorstring":"Username or password incorrect"}}}
Function: settext (set status + transcode + publish Video)
Methode: POST
After uploading, this method is used to set the status text (tweet), set the geodata and start transcoding the stream. After enconding your video will be published on mov.io
Methode: POST
Parameters:
mode:settext
username: the twitter username
password: the twitter password
streamid: the id which you used to upload the video
location_longitude: location data where the video was recorded
location_latitude: location data where the video was recorded
service: currently only the twitter service is available in next version Facebook, StudiVZ, SchuelerVZ, MeinVZ will be available, too
streamid: see upload_video function
appkey: you get this key when you register your application
Example:
We prepared an example form to you:
http://api.sandbox.mov.io/test_form_encode.php Results:
{"movio_response":{"status":{"resultcode":"002","resultstring":"text received","received_text":"fbfdgdfg","streamid":"morgenfvdgd"}}}