Giter Site home page Giter Site logo

Comments (9)

RalphLincoln avatar RalphLincoln commented on July 16, 2024 2

RtmUnauthenticatedError: Error Code 5 - Signature verification failed. I keep getting this error. How do I resolve this?

from tools.

plutoless avatar plutoless commented on July 16, 2024

umm i tried php version and it's working properly for me. which php version are you using?

bash-3.2$ php RtmTokenBuilderSample.php
Rtm Token: 006970CA35de60c44645bbae8a215061b33IADhrR1vsVX3JqBO951BdxlKa7OVqwT7MGhhp86rpgdXd10HL3sAAAAAEAAdcgAA9DfnXgEA6AOE9OVe
bash-3.2$

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.

from tools.

plutoless avatar plutoless commented on July 16, 2024

maybe you can try running the sample code in sample folder? does that return you null as well?

from tools.

alexanza avatar alexanza commented on July 16, 2024

@RalphLincoln Did you use the same uid on the token generator and in the client ?

from tools.

RalphLincoln avatar RalphLincoln commented on July 16, 2024

Yes I did...... @alexanza

from tools.

plutoless avatar plutoless commented on July 16, 2024

@RalphLincoln sorry for late reply. could you pls help share the token you generated with me.

from tools.

RalphLincoln avatar RalphLincoln commented on July 16, 2024

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?

from tools.

amanvision avatar amanvision commented on July 16, 2024

Hi there,
Sample code works correctly, Following works for me:

Generate your $userAccount or $uid as:

$user = random_int(100000000, 999999999);
$user = (string)$user;
IMP: make sure you cast user id to string.

Pass this to RtmTokenBuilder::buildToken

Also, pass the same user id to AgoraEduSDK.launch config (userUuid)

from tools.

meyfemi avatar meyfemi commented on July 16, 2024

I found the issue, in the RtmTokoenBuilder.php class, update buildToken() method with the code snippet below

 public static function buildToken($appID, $appCertificate,$channelName, $userAccount, $role, $privilegeExpireTs){
        $token = AccessToken::init($appID, $appCertificate, $channelName,$userAccount);
        $Privileges = AccessToken::Privileges;
        $token->addPrivilege($Privileges["kRtmLogin"], $privilegeExpireTs);
        return $token->build();
    }

from tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.