The Vimeo API SDK for .NET provides access to the Vimeo API REST APIs from .NET applications.
Build something great. Vimeo's API supports flexible, high-quality video integration with your custom apps.
Add the .NET SDK as a project reference into your solution:
dotnet add reference <path-to-sdk>/VimeoApi.csprojRegister the client with IServiceCollection and resolve it from the container. The HttpClient is managed by IHttpClientFactory. Configure the client's behavior through VimeoApiClientOptions.
services.AddVimeoApiClient(options =>
{
options.Bearer = "YOUR_BEARER_TOKEN";
options.Oauth2ClientCredentials =
new OAuth2ClientCredentials
{
ClientId = "YOUR_CLIENT_ID",
ClientSecret = "YOUR_CLIENT_SECRET",
};
options.Oauth2AuthorizationCode =
new OAuth2AuthorizationCodeCredentials
{
ClientId = "YOUR_CLIENT_ID",
RedirectUri = "YOUR_REDIRECT_URI",
PromptForAuthorizationCode = authUrl => Task.FromResult(""),
};
options.Environment = ServerEnvironment.Production;
// TODO: configure more client options here
});Create the client by passing an HttpClient you manage yourself. Configure the client's behavior through VimeoApiClientOptions.
var httpClient = new HttpClient();
// TODO: configure more client options here
var options =
new VimeoApiClientOptions
{
Bearer = "YOUR_BEARER_TOKEN",
Oauth2ClientCredentials = new OAuth2ClientCredentials
{
ClientId = "YOUR_CLIENT_ID",
ClientSecret = "YOUR_CLIENT_SECRET",
},
Oauth2AuthorizationCode = new OAuth2AuthorizationCodeCredentials
{
ClientId = "YOUR_CLIENT_ID",
RedirectUri = "YOUR_REDIRECT_URI",
PromptForAuthorizationCode = authUrl => Task.FromResult(""),
},
Environment = ServerEnvironment.Production,
};
var client = new VimeoApiClient(httpClient, options);For code examples and error responses, see API Reference.
Tip
Use a single VimeoApiClient instance for the lifetime of your application and
reuse it across all requests. Creating a new instance per request might exhaust the
connection pool.
This SDK is distributed under the MIT License.
Refer to the API reference for detailed information on available operations with code samples.