HMAC-Signed token authentication

I have configured Janus, and it works great with the “Stored token based authentication mechanism”. However, when trying to implement “HMAC-Signed token authentication” for the videoRoom plugin, I am unable to authenticate. I generate a code like: “1724437402,janus,janus.plugin.echotest,janus.plugin.videocall,janus.plugin.videoroom:6vGyTy5xuf/85+zWCgyVIybwE7g=”, I added token_auth and token_auth_secret to the config, then I try to connect on the web client side using janus.js:

// Create session
janus = new Janus({
    server: server,
    iceServers: iceServers,
    token: "1724437402,janus,janus.plugin.echotest,janus.plugin.videocall,janus.plugin.videoroom:6vGyTy5xuf/85+zWCgyVIybwE7g=",
    success: function() {
        // Attach to VideoRoom plugin
        janus.attach({
            plugin: "janus.plugin.videoroom",

And I get the error: Unauthorized request (wrong or missing secret/token). What am I doing wrong?

Please refer to the documentation for more info:
https://janus.conf.meetecho.com/docs/auth

I read it twice, in case of “Stored token based authentication” everything works fine as expected, but with HMAC-Signed token I don’t understand yet what I’m doing wrong. Maybe I’m transmitting the token from the web incorrectly? I’d be very grateful if you could point out my mistake more precisely.