You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.kenakamu / UCWA2.0-CS Public archive
C# library for UCWA 2.0
Notifications You must be signed in to change notification settings
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Go to fileThis 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.
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(""); await client.SignIn(availability:Availability.Online, supportMessage:true, supportAudio:false, supportPlainText:true, supportHtmlFormat:false, phoneNumber:"", keepAlive:true);
5. Do anything you need.