SvRooij.TeamsMonitor.Core
0.3.0
See the version list below for details.
dotnet add package SvRooij.TeamsMonitor.Core --version 0.3.0
NuGet\Install-Package SvRooij.TeamsMonitor.Core -Version 0.3.0
<PackageReference Include="SvRooij.TeamsMonitor.Core" Version="0.3.0" />
paket add SvRooij.TeamsMonitor.Core --version 0.3.0
#r "nuget: SvRooij.TeamsMonitor.Core, 0.3.0"
// Install SvRooij.TeamsMonitor.Core as a Cake Addin
#addin nuget:?package=SvRooij.TeamsMonitor.Core&version=0.3.0
// Install SvRooij.TeamsMonitor.Core as a Cake Tool
#tool nuget:?package=SvRooij.TeamsMonitor.Core&version=0.3.0
SvRooij.TeamsMonitor.Core
A simple library you can use to connect to your local Teams Client. This library manages the required websocket connection so you can get instant updates from your Teams client.
You can also control various settings using this library. Just explore all the methods on the TeamsSocket
.
Sample code
using var socket = new TeamsSocket(new TeamsSocketOptions("{token-from-teams-client}"));
socket.Update += (object sender, MeetingUpdate update) => { ... }
await socket.ConnectAsync(true, cancellationToken);
dotnet tool available
There also is an application available, if you just want to forward your Teams status to any webserver (like home assistant).
Teams has a local api?
Yes, it does! If you never heard of it, that might be right because it was released February 1st 2023. Once you enable it, you get a local api token.
I'm not explaining what the api looks like, as Martijn Smit already did that. For now you just need to know, if you enable the local api your Teams client will open a websocket server at localhost post 8124
.
You can just use any client that supports websockets and connect to the following url.
ws://localhost:8124?token=API-TOKEN-FROM-PRIVACY&protocol-version=1.0.0&manufacturer=MuteDeck&device=MuteDeck&app=MuteDeck&app-version=1.4
If something changes to your meeting status (or any of the other values), you'll get a JSON encoded message on the open websocket connection that looks like:
{
"apiVersion": "1.0.0",
"meetingUpdate": {
"meetingState": {
"isMuted": false,
"isCameraOn": true,
"isHandRaised": false,
"isInMeeting": false,
"isRecordingOn": false,
"isBackgroundBlurred": false
},
"meetingPermissions": {
"canToggleMute": false,
"canToggleVideo": true,
"canToggleHand": false,
"canToggleBlur": false,
"canToggleRecord": false,
"canLeave": false,
"canReact": false
}
}
}
Socials
If you like my Teams Monitor, please give me a shout out on any of these platforms.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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 is compatible. 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 was computed. 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. |
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.