Home > Blockchain >  Start Teams call from WinForms application - c#
Start Teams call from WinForms application - c#

Time:01-11

I'm trying to start a Microsoft Teams call from my WinForms c# application.

I think this is possible by opening a link that then triggers the Teams app to open. I've searched the internet and stack overflow but can't find any good working examples.

I've also tried the below code, but nothing opens.

ProcessStartInfo processStartInfo = new ProcessStartInfo("https://teams.microsoft.com/l/call/0/0?users=<username>");

Changed ProcessStart code to the below and it will now open the link, but I receive an error within the Teams app: 'There's a problem with the link'

Process.Start(new ProcessStartInfo("https://teams.microsoft.com/l/call/0/0?users=<user1>,<user2>") { UseShellExecute = true });

Thanks

CodePudding user response:

You can use msteams: url scheme like this:

System.Diagnostics.Process.Start("msteams:l/call/0/[email protected]");

Then it opens Microsoft Teams and asks you if you want to make the call. You can find the supported format and parameters of here:

CodePudding user response:

Probably the reason is your link is not correct. Please look at this answer. Start Teams call from c#

And also try this kind of link for voice call:

https://teams.microsoft.com/l/call/0/0?users=<user1>,<user2>

and try this kind for video call:

https://teams.microsoft.com/l/call/0/0?users=<user1>,<user2>&withVideo=true
  • Related