Tools
Tools copied to clipboard
Error 110 Token Generate C#
Hi!
I was trying to test the token creator but when i generate a token with this it doesn't work, please help!
private string _appId = "xxxxxxxxxxxxx"; private string _appCertificate = "xxxxxxxxxxx"; private string _channelName = "123456789"; private string _uid = "7894561230"; private uint _ts = (uint)DateTimeOffset.Now.ToUnixTimeSeconds(); private uint _salt = 1; private uint _expiredTs = 1611537276;
[Fact]
public void testGenerateDynamicKey()
{
_expiredTs = _ts + 10000;
AccessToken token = new AccessToken(_appId, _appCertificate, _channelName, _uid);
token.addPrivilege(Privileges.kJoinChannel, _expiredTs);
string result = token.build();
// Assert.Equal(expected, result);
}
could you pls provide a token you generated?
I generated Token using c# for RTC and RTM. For RTM, its working perfectly fine but for RTC i am getting the error. The token is "006cd972ece20434a42a3c1ddeea9e479e1IAAE6aAi7OSWBttPaNC/MgBCEcXK5gGrAb1+Ns6LCLNW034WEjqlc6GMEAAKJ52HogrXYAEAAgASx9Vg"
Same for me as well. Do we need to authenticate the given user from the agora? Is there any API available to authenticate users? Throughout Agora is a big failure for providing documentation for developers.
Same for me here. I cannot generate a valid token using the c# package. So far no one is able to help me yet on the ticket
https://github.com/AgoraIO/Tools/issues/131
Change _appId and _appCertificate to the account information you applied for, run the UT of this file https://github.com/AgoraIO/Tools/blob/master/DynamicKey/AgoraDynamicKey/csharp/test/AgoraIO.Tests/RtcTokenBuilderTest.cs. Test the generated token on this website https://webdemo.agora.io/agora-web-showcase/examples/Agora-Web-Tutorial-1to1-Web/