I built a website with videos from vimeo. I want to show thumbnails from those videos on my site, but the normal API access won't help. The videos are private and can be accessed only in this site How can I get those thumbnails? Thanks
Asked
Active
Viewed 4,029 times
2
-
I tried using C# API from [here](http://www.robgreen.me/post/Getting-Started-With-The-Vimeo-API-in-C.aspx) and had no luck. – Moran Monovich Jan 20 '15 at 12:01
-
Solved this question: http://stackoverflow.com/questions/1361149/get-img-thumbnails-from-vimeo – csassis Mar 21 '17 at 18:21
2 Answers
2
The API you linked is an old, deprecated API. The new API (developer.vimeo.com/api) will give you all the information you need.
You can learn more on the getting started page: https://developer.vimeo.com/api/start
Once you have a token, you can access your images from the direct video endpoint (https://api.vimeo.com/videos/{video_id}), Or from a collection of videos (such as https://api.vimeo.com/me/videos for your videos, or https://api.vimeo.com/channels/{channel_id}/videos for a channel's videos)

Dashron
- 3,968
- 2
- 14
- 21
-
Thanks Do you know which .Net API should I use for that? there are two versions: [VimeoDotNet3](https://github.com/saeedafshari/VimeoDotNet3) [vimeo-dot-net](https://github.com/scommisso/vimeo-dot-net) – Moran Monovich Jan 21 '15 at 14:03
-
I tried using the first one, but I can't figure out how to use it. I don't need a multi user app so I don't have any redirect url. – Moran Monovich Jan 25 '15 at 16:24
-
Those are both developed by third party developers. You will probably have better luck reaching out to them through their public support channels (often listed on the project page) – Dashron Jan 26 '15 at 16:00
0
This is a class with options for Large, Medium and Small images.
namespace VimeoWrapper
{
public enum ThumbnailSize { Large, Medium, Small };
public enum VimeoErrors { NotFound, SizeNotExist, NetError }
public static class VimeoHelper
{
public static string GetVideoThumbnail(string videoid, ThumbnailSize tns = ThumbnailSize.Large)
{
string query = String.Format("https://api.vimeo.com/me/videos/{0}", videoid);
string accessToken = "Token from API";
WebClient wc = new WebClient();
wc.Headers.Add("Authorization", "bearer " + accessToken);
string result;
try
{
result = wc.DownloadString(query);
}
catch (System.Net.WebException e)
{
return VimeoErrors.NotFound.ToString();
}
try
{
dynamic jsonResult = JValue.Parse(result);
switch (tns)
{
case ThumbnailSize.Large:
return jsonResult.pictures.sizes[5].link;
case ThumbnailSize.Medium:
return jsonResult.pictures.sizes[3].link;
case ThumbnailSize.Small:
return jsonResult.pictures.sizes[1].link;
}
}
catch (JsonReaderException e)
{
return VimeoErrors.SizeNotExist.ToString();
}
catch (Exception e)
{
return VimeoErrors.NetError.ToString();
}
return VimeoErrors.NetError.ToString();
}
}
}

Moran Monovich
- 595
- 1
- 14
- 27