Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Vimeo thumbnails for private videos

I have a list of Vimeo private video urls (https://player.vimeo.com/video/1234567890), which I'd like to display as thumbnails on my page. I can't find a working way to do it.

Any solutions based on http://vimeo.com/api/v2/video/{id} are long dead.

And something like this https://i.vimeocdn.com/video/1234567890.jpg would return the wrong image.

Is there a way to get an image thumbnail url based on video id without authorization ?

UPDATE

In my case, I manged to get the thumbnail_url by querying

GET https://vimeo.com/api/oembed.json?url=https://player.vimeo.com/video/{id}

like image 419
sr9yar Avatar asked Oct 02 '18 09:10

sr9yar


1 Answers

oEmbed can be used to get a video's thumbnail links, depending on the video's privacy settings.

First off, oEmbed will only return metadata when the video has embed privacy set to "Embed Anywhere" or "Only on site I choose". A video with its embed privacy to "Embed Nowhere" will return 403.

Videos with these viewing privacy settings will return "full" metadata (including thumbnail links):

  • Anyone
  • Only people with the private link (must use the complete video url)
  • Hide this video from vimeo.com

Videos with these viewing privacy settings will only return the embed code:

  • Only people I follow
  • Only people I choose
  • Only people with a password

oEmbed documentation can be found here: https://developer.vimeo.com/apis/oembed

like image 120
Tommy Penner Avatar answered Sep 22 '22 08:09

Tommy Penner