October 23, 2018
|
Player API
How to Upload a new Video with Dailymotion’s API in 3 simple steps

Don’t waste your time anymore: upload your videos programmatically on your Dailymotion’s account thanks to our API. Follow this quick tutorial to learn more about the content upload process.
1. Get an upload URL to send your video file to
curl -H "Authorization: Bearer ${ACCESS_TOKEN}" \
"https://api.dailymotion.com/file/upload"
This will return a response like this:
{ "upload_url": "http://upload-10.dc3.dailymotion.com/upload?uuid=XXX&seal=XXX", "progress_url": "http://upload-10.dc3.dailymotion.com/progress?uuid=XXX"}
2. Upload your video file
curl -X POST \
-F 'file=@/path/to/your/video.mp4' \
'http://upload-10.dc3.dailymotion.com/upload?uuid=XXX&seal=XXX' # Reuse here the "upload_url" obtained in the previous call
This will return a response like this:
{ "acodec": "AAC", "bitrate": "428894", "dimension": "512x288", "duration": "10031", "format": "MPEG-4", "hash": "XXX", "name": "video", "seal": "XXX", "size": "537780", "streamable": "No", "url": "http://upload-07.dc3.dailymotion.com/files/XXX.mp4#XXX", "vcodec": "AVC"}
3. Create the video on Dailymotion with a final API call
curl -X POST -H "Authorization: Bearer ${ACCESS_TOKEN}" \
-d 'published=true' \
-d 'is_created_for_kids=false' \
-d 'url=http://upload-07.dc3.dailymotion.com/files/XXX.mp4#XXX' \ # Reuse here the "url" obtained in the previous call
-d 'title=TITLE' \ # Title of your video, like "My awesome video!"
-d 'channel=CHANNEL' \ # Category of your video, like "videogames"
"https://api.dailymotion.com/me/videos"
That’s it! Your video has been successfully uploaded to Dailymotion.
Read the full Video Upload documentation