<< Back to Twitvid API Documentation
upload
Use this method to upload a video without sending a tweet to Twitter (no resume support)
URL:
http://im.twitvid.com/api/upload
Formats:
xml, json
HTTP Method:
POST
Requires Authentication:
true
Parameters:
If passing in Authentication Token from authenticate:
{
- token: Required. The Authentication Token
}
else If passing in Twitter OAuth Echo parameter:
{
}
- message: Required. The Twitter message. This message will not be tweeted and is used as supplementary meta-data to the video.
- media_id: Optional. The media ID for this upload, obtained from GetID. Not setting this will generate a random media ID on back-end.
- geo_latitude: Optional.
- geo_longitude: Optional.
- format: Optional. Select the return type (xml by default)
- thumbnail: Optional. Contains image data of the thumbnail to be associated with the video.
- category_id: Optional. The category ID for this upload, you can choose one from the list returned by getCategories.
- description: Optional. Text description
- title: Optional. Title for the video
- source: Optional. Data source (name of the application)
- chunkSize:Optional. If uploading this video in chunks, specify the size of this chunk.
- totalSize: Required if doing chunked uploads. The total size of this video.
- bytepos: Required if doing chunked uploads. This is the response from getLastByte.
- media: Required. Binary video data must be posted as multipart/form-data
Usage Notes:
- Either pass OAuth Echo Headers, or pass token from authenticate. These are required for authentication.
- The order of the passed in parameters is important. Always pass in the media data as the last parameter. Otherwise an error will be returned.
- The returned media_id value can be used to generate an embed code
- The location will only be recorded if both geo_latitude and geo_longitude are set.
Response:
XML example:
<?xml version='1.0' encoding='UTF-8'?>
<rsp status='ok'>
<status_id>1111</status_id>
<user_id>TwitUsername</user_id>
<media_id>3GS34</media_id>
<media_url>http://twitvid.com/3GS34</media_url>
<geo_latitude>57.64911</geo_latitude>
<geo_longitude>10.40744</geo_longitude>
</rsp>
JSON example:
{"rsp":"ok",
"status_id":"1111",
"user_id":"TwitUsername",
"media_id":"3GS34",
"media_url":"http://twitvid.com/3GS34",
"geo_latitude":"57.64911,
"geo_longitude":"10.40744"}
<< Back to Twitvid API Documentation
Comments (0)
You don't have permission to comment on this page.