Anjo.Android.AgoraIO.AgoraDynamicKey
4.0.0
dotnet add package Anjo.Android.AgoraIO.AgoraDynamicKey --version 4.0.0
NuGet\Install-Package Anjo.Android.AgoraIO.AgoraDynamicKey -Version 4.0.0
<PackageReference Include="Anjo.Android.AgoraIO.AgoraDynamicKey" Version="4.0.0" />
paket add Anjo.Android.AgoraIO.AgoraDynamicKey --version 4.0.0
#r "nuget: Anjo.Android.AgoraIO.AgoraDynamicKey, 4.0.0"
// Install Anjo.Android.AgoraIO.AgoraDynamicKey as a Cake Addin #addin nuget:?package=Anjo.Android.AgoraIO.AgoraDynamicKey&version=4.0.0 // Install Anjo.Android.AgoraIO.AgoraDynamicKey as a Cake Tool #tool nuget:?package=Anjo.Android.AgoraIO.AgoraDynamicKey&version=4.0.0
Anjo.Android.AgoraIO.AgoraDynamicKey
This section delves into the authentication mechanism implemented by the Agora SDK. Equally important, this also provides the requisite code for generating access tokens - Wael Anjo
This page describes the authentication mechanism used by the Agora SDK, as well as providing the related code for generating AccessToken (v2.1.0) or Dynamic Key (v2.0.2 or earlier). https://github.com/AgoraIO/Tools/tree/master/DynamicKey/AgoraDynamicKey
How To Use
AccessToken
AccessToken is more powerful than the legacy Dynamic Key. It encapsulates several privileges in one token to cover various services provided by Agora.
AccessToken is available as of SDK 2.1.0.
Sample usage,
- For Rtm Token
private string _appId = "970CA35de60c44645bbae8a215061b33";
private string _appCertificate = "5CFd2fd1755d40ecb72977518be15d3b";
private string _account = "2882341273";
private uint _expireTimeInSeconds = 3600;
uint privilegeExpiredTs = _expireTimeInSeconds + (uint)Utils.getTimestamp();
string token = RtmTokenBuilder.buildToken(_appId, _appCertificate, _account, privilegeExpiredTs);
Console.WriteLine(">> token" + token);
- For Rtc Token
private string _appId = "970CA35de60c44645bbae8a215061b33";
private string _appCertificate = "5CFd2fd1755d40ecb72977518be15d3b";
private string _channelName = "7d72365eb983485397e3e3f9d460bdda";
private string _account = "2882341273";
private uint _uid = 2882341273;
private uint _expireTimeInSeconds = 3600;
uint privilegeExpiredTs = _expireTimeInSeconds + (uint)Utils.getTimestamp();
string token = RtcTokenBuilder.buildTokenWithUserAccount(_appId, _appCertificate, _channelName, _account, RtcTokenBuilder.Role.RolePublisher, privilegeExpiredTs);
Console.WriteLine(">> token" + token);
Star on Github if this project helps you: https://github.com/mhdwaelanjo/Anjo.Android.AgoraIO.AgoraDynamicKey
Agora Full SDK
You can fine Agora.io Rtc Full SDK for .NET for Android Here :
Agora Lite SDK
You can fine Agora.io Rtc Lite SDK for .NET for Android Here :
Help & Feedback:
- You can subscribe to the channel on the telegram Anjo Help & Feedback to learn about the latest updates to my packages on Nuget.com
SUPPORT:
- ☕ Buy me a coffee: By PayPal
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0-android33.0 is compatible. net8.0-android was computed. net8.0-android34.0 is compatible. |
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
4.0.0 | 191 | 10/21/2024 |
Agora.io Dynamic Key - Access Tokens SDK v4.0.0