curluploaddailymotion-api

Dailymotion video upload using curl


I am trying to get video from google drive to daily motion using curl. i am new to this.

i first logged in using: curl --user name:password http://www.dailymotion.com/ then followed guide with this :

curl --request POST \

 --header "Authorization: Bearer ${ACCESS_TOKEN}" \
 --form 'url=<VIDEO_URL>' \
 --form 'title=Dailymotion cURL upload test' \
 --form 'tags=dailymotion,api,sdk,test' \
 --form 'channel=videogames' \
 --form 'published=true' \
 "api url"

but its giving me error "code":400,"message":"Invalid Authorization header format." Anyone can help?


Solution

  • How do you get the access token? Your code looks valid, but given the error message, your access token must not be ok. In the code you provide, you have to replace ${ACCESS_TOKEN} by an actual access token.

    To get an access token, you can: