Skip to content

A comprehensive .NET library for the TeamViewer REST API

License

Notifications You must be signed in to change notification settings

panoramicdata/TeamViewer.Api

Repository files navigation

TeamViewer.Api

Nuget Nuget License: MIT Codacy Badge

A comprehensive .NET library for the TeamViewer REST API.

Installation

dotnet add package TeamViewer.Api

Or via the NuGet Package Manager:

Install-Package TeamViewer.Api

Quick Start

using 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);
}

Features

  • 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

Supported APIs

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

Authentication

TeamViewer.Api uses Script Token authentication. To obtain a Script Token:

  1. Log in to the TeamViewer Management Console
  2. Navigate to Company Administration > API Access
  3. Click Create Script Token
  4. Configure the required permissions for your use case
  5. Copy the generated token

API Documentation

The TeamViewer API documentation can be found here:

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A comprehensive .NET library for the TeamViewer REST API

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published