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?

share|improve this question
up vote 0 down vote accepted

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:

share|improve this answer
    
Thank you. It helps. – Jay Patel Jun 13 '16 at 12:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.