Reputation: 4368
I am trying to make a request to the Vimeo api v3 using this request URL:
https://api.vimeo.com/videos?query=elvis&client_id=XXXXXXXXXXXXXXXXX&token=XXXXXXXXXXXXXXXXXXXX
The token I am sending is copy and pasted from the web interface. I generated it there. I'm trying it from the browser and receiving this response:
{
"error": "A valid user token must be passed."
}
I know the simple answer is that I copied the token incorrectly but I have tried this multiple times with different tokens and receive the same response. I believe there is something wrong with the way I am making the request.
Upvotes: 1
Views: 1279
Reputation: 14212
Vimeo auth requires you to add an Authorization
header with the value Bearer {YOUR TOKEN}
as @AbM and @peeskillet mentioned above.
It's ok to generate the token on the dashboard (as you did) for testing, but you will have to implement the OAuth2 flows for a real app.
(You can also easily test their API using this: https://developer.vimeo.com/api/playground/)
Some services allow you to pass access_tokens
on a query string (looks like Vimeo supports it, but it is not recommended),. They are often called access_token
, but it is generally not recommended.
Upvotes: 2