petaire
petaire

Reputation: 515

Vimeo API connection issue : what to do?

I'm following the API authentification doc but I don't really know what to do… The main goal is to upload a video through curl. I've tried their python script, but you do not get information regarding your upload, like progress or speed.

So I'm doing that :

code=`echo 'myID:mySecret' | base64`
echo `curl --data 'Authorization : basic $code' --data 'grant_type : yes' http://vimeo.com/oauth/authorize/client`

But I don't get anything in return :

enter image description here

Ok so I guess my request have been sent, but then what ? Shouldn't I get a response or something ?

edit : so I had better luck with this :

code=`echo -n 'myID:mySecret' | base64`

echo curl -H 'Authorization: basic $code' -d 'grant_type=client_credentials' https://api.vimeo.com/oauth/authorize/client

But still stuck with this :

{ "error": "You must provide a valid authenticated access token." }

Upvotes: 0

Views: 419

Answers (1)

zM_
zM_

Reputation: 21

1 - You shouldn't pass your basic auth header (Authorization) as POST data. Change --data to -H.

2 - The POST data you try to send is ill-formed. GET and POST data are formatted like this : key=value&key2=value2.

3 - You don't send this request to the right adress. Vimeo API is located at http://api.vimeo.com ; )

Last thing : echo returns a \n at the end by default. You can use -n switch to prevent this behavior.

Upvotes: 1

Related Questions