Getting: Get server node failed [NO_AUTHORIZED] when tried to use a token created from Server [PHP]
$appID = APP_ID $appCertificate =CERTIFICATE_KEY; $channelName = "test"; $uid = uniqid(); $uidStr = "$uid"; $role = RtcTokenBuilder::RolePublisher; $expireTimeInSeconds = 3600; $currentTimestamp = (new DateTime("now", new DateTimeZone('GMT+5:30')))->getTimestamp(); $privilegeExpiredTs = $currentTimestamp + $expireTimeInSeconds; $token = RtcTokenBuilder::buildTokenWithUid($appID, $appCertificate, $channelName, $uid, $role, $privilegeExpiredTs);
I don't know what is wrong in token generated dynamic, does not allow to broadcast : Join failed: NO_AUTHORIZED.
If I only change $token variable to static temp token then it worked.
Console mode is testing : Certificate is enabled.
generated_token = "006f605e69e63244441a70236c910865104IACFCvNqL1ODQuA2Lmf6Ig8KmXsT630UaZYLHTjVNbhRNvadZ7nomGXdIgBw0AAA3SoSYAQAAQBt5xBgAwBt5xBgAgBt5xBgBABt5xBg"
Thanks
what is your uid and channel name used when generating the token?
Hi...
What do you mean by "If I only change $token variable to static temp " please?
Thanks
You can test with the following tools
https://github.com/AgoraIO/Tools/tree/master/DynamicKey/AgoraDynamicKey
