A comprehensive .NET library for the TeamViewer REST API.
dotnet add package TeamViewer.ApiOr via the NuGet Package Manager:
Install-Package TeamViewer.Apiusing TeamViewer.Api;
// Create the client with your Script Token
var options = new TeamViewerClientOptions
{
ScriptToken = "your-script-token-here"
};
using var client = new TeamViewerClient(options);
// Test connectivity
var ping = await client
.Ping
.PingAsync(cancellationToken);
// Get account information
var account = await client
.Account
.GetAsync(cancellationToken);
// List users
var users = await client.Users.GetUsersAsync(new GetUsersRequest(), cancellationToken);
foreach (var user in users.Users)
{
Console.WriteLine(user.Name);
}
// List devices
var devices = await client
.Devices
.GetAsync(new GetDevicesRequest(), cancellationToken);
foreach (var device in devices.Devices)
{
Console.WriteLine(device.Alias);
}- Full TeamViewer REST API coverage - Users, Groups, Devices, Contacts, Sessions, Meetings, Reports, Policies, and more
- Script Token authentication - Simple bearer token authentication
- Automatic retry with exponential backoff - Handles rate limiting (429) and transient errors (5xx)
- Comprehensive logging support - Integrates with Microsoft.Extensions.Logging
- Strongly-typed models - Full IntelliSense support with XML documentation
- Async/await patterns - All methods are async with CancellationToken support
- Modern .NET - Built for .NET 10 with nullable reference types
| API | Description |
|---|---|
| Ping | Test connectivity and token validity |
| Account | Get and update account information |
| Users | Manage company users (CRUD operations) |
| Groups | Manage groups and sharing |
| Devices | Manage devices in Computers and Contacts |
| Contacts | Manage contacts |
| Sessions | Manage session codes for remote support |
| Meetings | Schedule and manage meetings |
| Reports | Access connection and device reports |
| Event Logging | Access audit logs |
| Policies | Manage TeamViewer policies |
TeamViewer.Api uses Script Token authentication. To obtain a Script Token:
- Log in to the TeamViewer Management Console
- Navigate to Company Administration > API Access
- Click Create Script Token
- Configure the required permissions for your use case
- Copy the generated token
The TeamViewer API documentation can be found here:
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.