Agora-C_Sharp-SDK
Agora-C_Sharp-SDK copied to clipboard
Error dynamic use static key
Getting following error
Uncaught (in promise) AgoraRTCException: AgoraRTCError CAN_NOT_GET_GATEWAY_SERVER: flag: 4096, message: AgoraRTCError CAN_NOT_GET_GATEWAY_SERVER: dynamic use static key
I did use new key but no effect.
seems you are using websdk? did you calculate your token when joining channel?
@imtiazwazir Have you been able to resolve this? I am experiencing thesame error
@imtiazwazir @Highbee4u could you pls share the code how you join channel? this error means you should use a dynamic generated token to join channel while you use a static one.
@imtiazwazir @Highbee4u could you pls share the code how you join channel? this error means you should use a dynamic generated token to join channel while you use a static one.
I am using there PHP class here (https://github.com/AgoraIO/Tools/tree/master/DynamicKey/AgoraDynamicKey/php/sample) and It generate token but the token but couldn't authenticate as it shows this error
@Highbee4u the error basically indicates you are not using token at all. it does not even mean the token you generated is incorrect. could you pls share the code how you join channel?
@Highbee4u the error basically indicates you are not using token at all. it does not even mean the token you generated is incorrect. could you pls share the code how you join channel?
I am not the one responsible for that, I am only to generate token for Fontend people, but he most likely be using the sample code on the Agora Doc
then maybe your front-end people didn't take the token as join channel parameter. Maybe try asking him?
then maybe your front-end people didn't take the token as join channel parameter. Maybe try asking him?

this is what he sent
the first parameter of join should be the token you generated for him, instead of static APP_ID
the first parameter of join should be the token you generated for him, instead of static APP_ID
After changing the first parameter
this the response he got
this means the token you generated is incorrect. how did you generate your token?
this means the token you generated is incorrect. how did you generate your token?
I have been able to resolved it, I modified the php class and also changes the time parameter. Thanks
How did you solve the issue, please share that with me. I noticed that you are doing it from Dennis's video on youtube, because it's similar to my code
When I got this error it was because my API key and app id was null because I did not set up my environment variables right. I hope this helps someone.
Hi! For me the solution was to set the fourth argument of the client.join function to be the same as the one used to generate the token. Leaving it null will throw that error eg. await this.client.join("appID", "chanel", "token", "uid");
Hope this helps.
@plutoless eu peguei o token do certificado primario porém pra mim ainda continua o mesmo erro que do colega