This is a sample library for C# developer to consume UCWA 2.0 (Unified Communication Web API) of Office 365 Skype Service. For more detail about the Web API, please refer to Skype Developer Site (https://ucwa.skype.com)
The library is PCL so you can include it in any platform such as UWP, Console, Xamarin, etc. All methods are marked as async and all events are exposed as event so that you can subscribe to handle them. See test client for more detail.
This solution contains two projects. UCWASDK is main project which is C# wrapper. TestClient is console application using it. Once download the solution, do the following.
The wrapper contains all UCWA related class, enums and methods. However authentication is out of scope as each platform may use slightly different method. To authenticate user, use Active Directory Authentication Library (ADAL).
1. Add using to your code.
using Microsoft.Skype.UCWA;
using Microsoft.Skype.UCWA.Enums;
using Microsoft.Skype.UCWA.Models;
2. Instantiate UCWAClient.
UCWAClient client = new UCWAClient();
3. Subscribe SendingRequest to authenticate. You can also subscribe any other events as you need.
// Write some code to obtain accesstoken. You can use ADAL.
client.SendingRequest += (client, resource) => { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accesstoken); };
// For example, handle message received event.
client.MessageReceived += Client_MessageReceived;
4. Instantiate and SignIn.
await client.Initialize("<your tenant id>");
await client.SignIn(availability:Availability.Online, supportMessage:true, supportAudio:false, supportPlainText:true, supportHtmlFormat:false, phoneNumber:"", keepAlive:true);
5. Do anything you need.
Tam Huynh to help me start the project. https://github.com/tamhinsf/ucwa-sfbo-console
David Newman to help me drive the project. https://www.youtube.com/watch?time_continue=4&v=Epqrsexnn5g
Adam Hodge and Maxwell Roseman for encourage me.