-
Notifications
You must be signed in to change notification settings - Fork 830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTM Token samples missing channelName #82
Comments
umm i tried php version and it's working properly for me. which php version are you using?
it you look into the code you will notice rtm token builder is placing userAccount in init function channelName field. so as long as you provide userAccount, it should not return null. |
maybe you can try running the sample code in sample folder? does that return you null as well? |
RtmUnauthenticatedError: Error Code 5 - Signature verification failed. I keep getting this error. How do I resolve this? |
@RalphLincoln Did you use the same uid on the token generator and in the client ? |
Yes I did...... @alexanza |
@RalphLincoln sorry for late reply. could you pls help share the token you generated with me. |
It's been quite a long time now, I decided to move on without the token. But is the token needed in production. Could it break the application? |
Hi there, Generate your $userAccount or $uid as: $user = random_int(100000000, 999999999); Pass this to RtmTokenBuilder::buildToken Also, pass the same user id to AgoraEduSDK.launch config (userUuid) |
I found the issue, in the RtmTokoenBuilder.php class, update buildToken() method with the code snippet below
|
When calling the buildToken method with all the required arguments downloaded from: https://github.com/AgoraIO/Tools/blob/master/DynamicKey/AgoraDynamicKey/php/src/RtmTokenBuilder.php
$token is always null
and then the next line fails because $token is null
$token->addPrivilege($Privileges["kRtmLogin"], $privilegeExpireTs);
buildToken calls AccessToken::init without a channelName while the method requires a channeName in the function definition.
The same issue exists in your python3 and javascript samples in the master branch.
Even after fixing this issue, now I am getting an error when calling rtm api join.
RTM:ERROR Error Code 5. Signature verification failed.
The text was updated successfully, but these errors were encountered: