Mafesoft.VimeoClient 3.4.2

dotnet add package Mafesoft.VimeoClient --version 3.4.2
                    
NuGet\Install-Package Mafesoft.VimeoClient -Version 3.4.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mafesoft.VimeoClient" Version="3.4.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mafesoft.VimeoClient" Version="3.4.2" />
                    
Directory.Packages.props
<PackageReference Include="Mafesoft.VimeoClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Mafesoft.VimeoClient --version 3.4.2
                    
#r "nuget: Mafesoft.VimeoClient, 3.4.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Mafesoft.VimeoClient@3.4.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Mafesoft.VimeoClient&version=3.4.2
                    
Install as a Cake Addin
#tool nuget:?package=Mafesoft.VimeoClient&version=3.4.2
                    
Install as a Cake Tool

VimeoClient

NuGet Downloads Build License: MIT CodeQL .NET

Mafe.VimeoClient downloads

VimeoClient is an extensible .NET wrapper for the Vimeo API 3.4. It is built on Mafesoft.RestClient and covers every operation of the Vimeo API 3.4 OpenAPI specification with typed methods, models and parameters.

If VimeoClient is useful to you, consider supporting the project. ☕

Why VimeoClient

Feature Description
Whole Vimeo API 3.4 Every operation of the OpenAPI specification, grouped by section as in the Vimeo reference (client.Videos, client.Live, client.OnDemand…). See Sections
Typed models and parameters Responses mapped to classes, enums for the documented values, body classes for create and update requests. See On Demand
Synchronous and asynchronous Every method has an asynchronous version (...Async) for ASP.NET Core and UI applications. See Usage
Pagination Pagination<T> with Next() / Previous() (and NextAsync() / PreviousAsync()) to load the other pages, GetAllItems() / GetAllItemsAsync() to read the items of all the pages. See Sections
Nothing lost Unmapped fields in AdditionalData, undocumented responses as raw JsonElement, undocumented bodies as VimeoPayload. See Sections
API version The Accept header asks for the Vimeo API 3.4 by default; another version can be requested with ApiVersion. See Vimeo API version
Certificate pinning Standard TLS validation, or validation plus a list of trusted certificate hashes. See Certificates
Dependency injection and interfaces services.AddVimeoClient(...) from code or configuration; IVimeo and an interface for every section to mock the client. See Dependency injection
Resumable upload UploadAsync uploads a file with the tus approach: chunks, progress, resume after an error or with ResumeUploadAsync. See Upload a video
Rate limits and retry Optional retry of 429 and transient errors with backoff and Retry-After; GetRateLimit() reads the X-RateLimit-* headers. See Rate limits and retry
Latest Vimeo features Chapters, animated thumbnails, AI (questions, metadata, dubbing), audio tracks, transcripts, trimming, live scenes and destinations, analytics, webhooks, team custom metadata. See Videos: chapters, animated thumbnails, AI
Tested xUnit tests on every target framework against a fake HTTP handler, run on every push and pull request. See Tests

Compared with the other .NET libraries

Vimeo has no official .NET SDK. The other libraries on NuGet cover only a part of the API:

VimeoClient VimeoDotNet Skybrud.Social.Vimeo Vimeo.Net
Vimeo API sections All (25 sections, every operation of the 3.4 specification) Videos, upload, albums, channels, folders, embed presets, tags, text tracks Me, users, videos, channels Not documented
Live events, On Demand, webhooks, analytics, teams ✔ ✘ ✘ Not documented
Chapters, AI, audio tracks, transcripts, trimming ✔ ✘ ✘ Not documented
Status Stable Stable Stable Prerelease (3.4.0-alpha, 2023)
Targets .NET 8 and 10, .NET Standard 2.0 and 2.1, .NET Framework 4.6.2+ .NET Standard 1.3 and 2.0, .NET Framework 4.5 .NET 8, .NET Standard 2.0 .NET Standard 2.0
JSON System.Text.Json Newtonsoft.Json Skybrud.Essentials Newtonsoft.Json, RestSharp
Unmapped fields kept (AdditionalData) ✔ Not documented Raw responses Not documented
Certificate pinning ✔ Not documented Not documented Not documented

Compared in November 2026 on the public repositories and NuGet pages of each library.

Requirements

  • .NET 8 or 10
  • .NET Standard 2.0 or 2.1
  • .NET Framework 4.6.2, 4.7.2 or 4.8.1

Installation

The library is published on NuGet: Mafesoft.VimeoClient.

dotnet add package Mafesoft.VimeoClient

Migrating from Mafe.VimeoClient: since version 3.4.0 the package is Mafesoft.VimeoClient and the namespaces start with Mafesoft.VimeoClient (for example Mafesoft.VimeoClient.Model). Replace the package reference and change using VimeoClient... into using Mafesoft.VimeoClient....

Usage

Create the client with the credentials of your Vimeo API app:

using Mafesoft.VimeoClient;

var client = new Vimeo(new VimeoProperties
{
    AccessToken = "MyAccessToken",
    ClientSecret = "MyClientSecret",
    ClientId = "MyClientId",
    ValidCertificates = new List<string>() { "Vimeo certs" } // optional, see Certificates
});

Then call the Vimeo API methods through the client, for example to read the user information:

var me = client.Me.GetTheUser(); // the authenticated user
var user = client.Users.GetTheUser(userId); // another user

Every method has an asynchronous version with the Async suffix, which returns a Task:

var me = await client.Me.GetTheUserAsync();
var videos = await client.Videos.GetAllTheVideosThatTheUserHasUploadedAsync(per_page: 25);

Every asynchronous method accepts an optional CancellationToken as last parameter; when the token is canceled the request is stopped and the result has IsCancellationRequested set:

var video = await client.Videos.GetSpecificVideoAsync(videoId, cancellationToken);

Vimeo API version

Every request sends the header Accept: application/vnd.vimeo.*+json;version=3.4. You can request another version by VimeoProperties.ApiVersion:

var client = new Vimeo(new VimeoProperties
{
    AccessToken = "MyAccessToken",
    ApiVersion = "3.4" // default
});

Package version

The version of the Mafesoft.VimeoClient package has three numbers, for example 3.4.0:

  • the first two numbers (3.4) identify the Vimeo API version supported by the library;
  • the last number (0) is for the fixes of the library released for that Vimeo API version: 3.4.0 is the first release for the Vimeo API 3.4, 3.4.1 the next one, and so on.

Certificates

  • ValidCertificates empty: the standard TLS validation is used.
  • ValidCertificates set: the certificate must be valid and its hash must be in the list (pinning).
  • Debug = true skips the validation: use it only in development (default false).

Dependency injection

dotnet add package Mafesoft.VimeoClient.Extensions.DependencyInjection
// appsettings.json: { "Vimeo": { "AccessToken": "...", "MaxRetries": 3 } }
builder.Services.AddVimeoClient(builder.Configuration.GetSection("Vimeo"));

// or in code
builder.Services.AddVimeoClient(options => options.AccessToken = builder.Configuration["Vimeo:AccessToken"]);
public class VideoService(IVimeoVideos videos)          // or IVimeo for the whole client
{
    public Task<RestResult<Video>> GetAsync(int id) => videos.GetSpecificVideoAsync(id);
}
  • Vimeo, IVimeo and VimeoProperties are singletons; the interface of every section (IVimeoVideos, IVimeoUsers, ...) is registered too, so a class receives only the section it uses. A client registered before (for example a fake in the tests) is kept.
  • IVimeo and the section interfaces are in the main package: mock them in the tests of the application. They are generated from the classes by tools/GenerateInterfaces.cs (dotnet run tools/GenerateInterfaces.cs), and a test fails when a public method is missing from its interface.

Upload a video

UploadAsync uploads a video with the resumable tus approach: it creates the video, sends the file in chunks (PATCH with Upload-Offset) and, after an error, asks Vimeo how much it received (HEAD) and continues from there.

var progress = new Progress<long>(bytes => Console.WriteLine($"{bytes} bytes sent"));

VimeoUploadResult upload = await client.Videos.UploadAsync(
    "movie.mp4",
    new VideoUploadParameters { Name = "My movie", PrivacyView = VideoPrivacyView.unlisted },
    progress,
    cancellationToken);

if (upload.IsCompleted)
{
    Console.WriteLine($"Uploaded: {upload.Video.Link}");   // Vimeo now transcodes the video
}
else
{
    // Not completed (network down, cancelled...): resume later with the same file
    using var file = File.OpenRead("movie.mp4");
    upload = await client.Videos.ResumeUploadAsync(upload.UploadLink, file, progress);
}
  • UploadAsync(Stream, ...) uploads a seekable stream (a file or a memory stream) from its current position.
  • It does not throw for HTTP errors: IsCompleted, Offset, StatusCode and Exception tell what happened, and Creation is the result of the request that created the video.
  • The chunks are 8 MB (VimeoVideos.UploadChunkSize); a failed chunk is sent again up to 3 times in a row (VimeoVideos.UploadChunkRetries), each time from the offset received by Vimeo.
  • The chunks go to the upload link (the Vimeo upload servers) with the standard TLS validation: ValidCertificates pins the certificates of the API end point only.

Rate limits and retry

Vimeo limits the number of requests (rate limiting) and answers 429 Too Many Requests over the limit. The retry is off by default; turn it on with MaxRetries:

var client = new Vimeo(new VimeoProperties
{
    AccessToken = "...",
    MaxRetries = 3,                          // 429, 408, 500, 502, 503, 504, network errors and timeouts
    RetryDelay = TimeSpan.FromSeconds(1),    // 1s, 2s, 4s (+ jitter); the Retry-After header is honored
});

var result = client.Videos.GetSpecificVideo(123);
int retries = result.RetryCount;

VimeoRateLimit limit = result.GetRateLimit();   // X-RateLimit-Limit, -Remaining, -Reset; null without headers
if (limit?.Remaining == 0)
{
    Console.WriteLine($"Limit reached, it resets at {limit.Reset}");
}
  • Only GET, HEAD, PUT and DELETE are retried by default: a POST or a PATCH (creating a video, copying it) could be executed twice. Set RetryNonIdempotentMethods = true to retry them too.
  • The Retry-After header is honored up to 30 seconds. A 429 without it is retried with the backoff delays: use GetRateLimit().Reset to wait for the end of the window yourself.

Sections

Every section of the Vimeo API reference is a property of the client. All the operations of the Vimeo API 3.4 OpenAPI specification are implemented.

Property Section Notes
client.Me / client.Users Users: essentials, feeds, followers, pictures, watch history, LMS packages Me works on the authenticated user
client.Videos Videos: essentials, uploads, versions, audio tracks, text tracks, transcripts, thumbnails, chapters, animated thumbnails, fragments, trimming, credits, comments, tags, privacy, AI
client.Channels Channels: essentials, categories, moderators, members, subscriptions, tags, videos includes comments, credits, thumbnails, privacy and text tracks of channel videos
client.ShowCases Showcases (albums): essentials, videos, custom logos and thumbnails
client.Folders Folders (projects): essentials, items, videos
client.Live Live events: essentials, destinations, sessions, graphics, scenes, thumbnails, videos asynchronous methods only (...Async)
client.OnDemand On Demand: pages, backgrounds, genres, posters, promotions, purchases, regions, seasons, videos
client.EmbedPresets Embed presets: essentials, custom logos, folders, timeline events, videos
client.Analytics Analytics of the user's content Enterprise plan
client.Webhooks API app webhooks
client.Teams Teams: roles, memberships, custom metadata fields
client.TeamMembers Team membership by join code
client.Payments Payment methods, subscriptions, subscription plans
client.Search Federated search of users and workspaces
client.Files Hosted files
client.Categories, client.Groups, client.Likes, client.Portfolios, client.Tags, client.WatchLaterQueue The other sections of the reference
client.APIInformation, client.AuthenticationExtras, client.CommonFormatsParameters API specification, tokens, field filtering

Methods that return a list use Pagination<T>: call Next() / Previous(), or NextAsync() / PreviousAsync(), to load the other pages (they return null on the last / first page).

var videos = client.OnDemand.GetAllTheVideosOnAnOnDemandPage(ondemandId, per_page: 25);
var next = videos.Content.Next();
var nextAsync = await videos.Content.NextAsync(cancellationToken);

To read the items of all the pages, use GetAllItems() (all the targets) or GetAllItemsAsync() with await foreach (.NET Standard 2.1, .NET 8 and later): the next pages are loaded one at a time while the items are read.

var first = await client.Videos.GetAllTheVideosThatTheUserHasUploadedAsync(per_page: 100);

await foreach (var video in first.Content.GetAllItemsAsync(cancellationToken))
{
    Console.WriteLine(video.Name);
}

foreach (var video in first.Content.GetAllItems()) { /* ... */ }

When the specification does not document a response, the method returns the raw JSON (JsonElement); when it does not document a request body, the method accepts a VimeoPayload. The fields of a response not mapped by the library are available in AdditionalData.

On Demand

var page = client.OnDemand.MeCreateAnOnDemandPage(new CreateAnOnDemandPageBody
{
    Type = OnDemandPageType.film,
    Name = "My film",
    Description = "...",
    ContentRating = new List<OnDemandContentRating> { OnDemandContentRating.safe },
    Rent = new OnDemandPriceOption { Active = true, Period = OnDemandRentPeriod._1_week, Price = { ["USD"] = 1.99 } }
});

Videos: chapters, animated thumbnails, AI

var chapter = client.Videos.AddAChapterToAVideo(videoId, new ChapterParameters { Title = "Intro", Timecode = 0 });
var chapters = client.Videos.GetAllTheChaptersOfAVideo(videoId);

var thumbset = client.Videos.CreateASetOfAnimatedThumbnailsForAVideo(videoId, duration: 6, start_time: 10);

// AI: a 202 status code means that the video is still being prepared, retry after a few seconds
var answer = client.Videos.AskAQuestionAboutAVideo(videoId, "What is the video about?");
var metadata = client.Videos.GetAIGeneratedVideoMetadata(videoId); // title, description and tags
var dubbing = client.Videos.StartAIAudioDubbingForAVideo(videoId, language: "it");

Videos: versions, audio tracks, transcripts, fragments, trimming

// Alternate audio tracks of a version: create it, then upload the file to the returned link
var track = client.Videos.CreateAnAudioTrackForAVideoVersion(videoId, versionId,
    upload_approach: "tus", upload_size: fileSize, language_code: "it-IT", type: "main");
var tracks = client.Videos.GetAllTheAudioTracksOfAVideoVersion(videoId, versionId);
var downloads = client.Videos.GetTheDownloadLinksOfAVideoVersion(videoId, versionId); // raw JSON

// Transcripts
var segments = client.Videos.GetTheTranscriptSegmentsOfATextTrack(videoId, texttrackId);

// Nondestructive trimming and fragments
var trimmed = client.Videos.StartATrimOperationForAVideo(videoId, trim_start: 5, trim_end: 60);
var fragments = client.Videos.GetAllTheFragmentsOfAVideo(videoId);

// Users who can be credited
var candidates = client.Videos.GetTheUsersWhoCanBeCreditedOnAVideo(videoId, query: "john");

Channel videos

The channel ID is a string (it can be a numeric ID or a name, for example staffpicks); the video ID can be an int or a string.

var comments = client.Channels.GetAllTheCommentsOnAChannelVideo(channelId, videoId);
client.Channels.AddACommentToAChannelVideo(channelId, videoId, "Great video!");
var tracks = client.Channels.GetAllTheTextTracksOfAChannelVideo("staffpicks", videoId);

Live: destinations, graphics, scenes

var status = await client.Live.GetTheIngestStatusOfAnEventAsync(liveEventId);

// Simulcast destinations
var destinations = await client.Live.GetAllTheAvailableEventDestinationsAsync(); // raw JSON
var destination = await client.Live.UpdateAnEventDestinationAsync(destinationId, is_enabled: true);
var ott = await client.Live.GetAllTheOttDestinationsOfAnEventAsync(userId, liveEventId);

// Composer: video graphics and scenes
var graphic = await client.Live.AddAVideoGraphicsItemToAnEventAsync(liveEventId, videoId);
var scene = await client.Live.CreateASceneForAnEventAsync(liveEventId);
var scenes = await client.Live.GetAllTheScenesOfAnEventAsync(liveEventId);
await client.Live.ResetTheScenesOfAnEventAsync(liveEventId);

Analytics

The Analytics API requires an Enterprise plan and must be enabled for the API app by Vimeo support.

var stats = client.Analytics.GetAnalyticsForTheAuthenticatedUser(
    AnalyticsDimension.country,
    from: new DateTime(2026, 1, 1),
    to: new DateTime(2026, 1, 31),
    time_interval: AnalyticsTimeInterval.week,
    sort: AnalyticsSort.views,
    direction: AnalyticsDirection.desc);

foreach (var row in stats.Content.Data)
{
    Console.WriteLine($"{row.Country?.Name}: {row.Views} views, {row.TotalTimeWatched}s watched");
}

Webhooks

var webhook = client.Webhooks.AddAWebhookForAnApp(appId,
    webhook_type: "video-transcode-complete",
    webhook_url: "https://example.com/hook",
    is_enabled: true,
    secret: "my-secret");

var webhooks = client.Webhooks.GetAllTheWebhooksOfAnApp(appId);
client.Webhooks.UpdateAWebhook(appId, webhookId, is_enabled: false);
client.Webhooks.DeleteAWebhook(appId, webhookId);

Teams

var role = client.Teams.GetTheRoleOfTheUserOnATeam(teamOwnerId);

// Custom metadata fields: omit Id to create, set Id to update, set Id and Delete = true to delete
var fields = client.Teams.CreateUpdateOrDeleteTheCustomMetadataFieldsOfATeam(teamOwnerId, new[]
{
    new CustomMetadataFieldChange { Name = "Department", Type = "select", Mandatory = true, Values = new[] { "Sales", "Engineering" } }
});

client.Teams.UpdateTheOptionsOfACustomMetadataField(teamOwnerId, fieldId, new[]
{
    new CustomMetadataOptionChange { OldValue = "Engineering", NewValue = "R&D" }
});

client.Teams.BackfillACustomMetadataValueAcrossTheVideosOfATeam(teamOwnerId, fieldId, "Sales");
var incomplete = client.Teams.GetTheVideosMissingMandatoryCustomMetadata(teamOwnerId); // raw JSON

Payments, search, files, LMS

var plan = client.Payments.GetASubscriptionPlan("pro");
var methods = client.Payments.GetAllThePaymentMethods();

var items = client.Search.SearchTheItemsOfAUser(userId, query: "demo", query_fields: new[] { "title", "tags" });

var file = client.Files.GetAFile(publicFileId);

// Zipped proxy package for a learning management system
var package = client.Users.DownloadAnLmsPackageForAVideo(teamOwnerId, videoId, standard: "scorm2004_3rd");
File.WriteAllBytes("course.zip", package.Content);

Other sections

var folders = client.Folders.GetAllTheFoldersThatBelongToTheUser();
var showcases = client.ShowCases.GetAllTheShowcasesThatBelongToTheUser();
var video = client.Videos.GetSpecificVideo(videoId);

Sample app

samples/VimeoClientSampleApp shows the common scenarios: the authenticated user, the list of the videos with pagination, the upload of a video (from a local file or a public URL) and the webhooks of an API app. The keys are read with dotnet user-secrets (or the environment variables Vimeo__AccessToken, Vimeo__ClientId…):

cd samples/VimeoClientSampleApp
dotnet user-secrets set "Vimeo:AccessToken" "your-access-token"
dotnet run -- videos
dotnet run -- upload path/to/video.mp4
dotnet run -- webhook APP_ID PUBLIC_URL

Tests

The xUnit tests are in tests/VimeoClient.Tests. They don't call Vimeo: every request is sent to a fake HTTP handler, which checks the method, the path, the query string and the body, and returns canned responses.

dotnet test src/VimeoClient.sln

The tests run on net462, net472, net481, net8.0 and net10.0: the .NET Framework targets run only on Windows.

The GitHub Actions pipelines run the tests on every push and pull request (ci.yml: .NET 8 and 10 on Linux, every target on Windows), and the package is published on NuGet only when all the tests pass on every target (nuget.yml).

Integration tests

The integration tests in tests/VimeoClient.IntegrationTests call the real Vimeo API, so they notice when Vimeo changes it. They run only when the VIMEO_ACCESS_TOKEN environment variable is set, otherwise they are skipped:

  • read-only calls (Tutorial, Me, videos with pagination, folders) need only the access token;
  • the calls that create and delete resources (a folder) run only with VIMEO_INTEGRATION_WRITE=true: use a test account.
export VIMEO_ACCESS_TOKEN=... # never commit the token
dotnet test tests/VimeoClient.IntegrationTests/VimeoClient.IntegrationTests.csproj

The integration.yml pipeline runs them every Monday and manually, with the VIMEO_ACCESS_TOKEN repository secret and the VIMEO_INTEGRATION_WRITE repository variable.

Support

If VimeoClient saves you time, you can say thanks with a small donation. It is never required, but it helps me keep the project maintained and up to date.

Donate

A star on GitHub, a bug report or a pull request help too. Thank you!

License

VimeoClient is released under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Mafesoft.VimeoClient:

Package Downloads
Mafesoft.VimeoClient.Extensions.DependencyInjection

Registers Mafesoft.VimeoClient in the Microsoft.Extensions dependency injection: services.AddVimeoClient(options => ...) or from the configuration, with IVimeo and the interfaces of the sections (IVimeoVideos, ...).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.4.2 97 11/18/2026
3.4.1 103 11/14/2026
3.4.0.4 97 11/14/2026
3.4.0.3 87 11/12/2026
3.4.0.2 94 11/8/2026
3.4.0.1 94 11/7/2026
3.4.0 99 11/4/2026