Skip to content

Implementation of the Tokbox OpenTok REST api for .Net Standard and port of a few SDK methods

License

Notifications You must be signed in to change notification settings

ErikAndreas/OpenTokNetStandardSDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenTok .Net Standard SDK

Implementation of the Tokbox OpenTok REST api and port of a few SDK methods, see https://github.com/opentok/Opentok-.NET-SDK

Scope

This SDK only implements the CreateSession and GenerateToken methods.

Usage

This SDK is created for usage with e.g. Azure Functions in mind

// generate session
string sessionId = await OpenTok.CreateSessionAsync(System.Environment.GetEnvironmentVariable("TOKBOX_SECRET"), 
                System.Environment.GetEnvironmentVariable("TOKBOX_APIKEY"));

// generate token
string apiKey = System.Environment.GetEnvironmentVariable("TOKBOX_APIKEY");
string secret = System.Environment.GetEnvironmentVariable("TOKBOX_SECRET");
string role = "publisher"; // "moderator";
string data = null; // see https://tokbox.com/developer/guides/create-token/ Connection data
double ttl =  24 * 60 * 60;
string token = OpenTok.GenerateToken(secret, apiKey, sessionId, role, data, ttl);

About

Implementation of the Tokbox OpenTok REST api for .Net Standard and port of a few SDK methods

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages