Unable to join room. The user is not authorized. Code: 401

Hi everyone. I’m trying to get OpenVidu working in my local dev environment to see if it’s right for my project. I have the servers up and running. I am able to create a session and generate a token using the REST api. In javascript I’m able to initialize the session, but when I try to connect I get the following error…

ERROR:Unable to join room. The user is not authorized. Code: 401 in Request: method:joinRoom params:{"token":"wss://localhost:4443?sessionId=mvpo40l5xczs3gop&token=cpjq6bwndvr8qwwv&role=PUBLISHER&version=2.11.0","session":"mvpo40l5xczs3gop","platform":"Chrome 79.0.3945.130 on OS X 10.13.6 64-bit","metadata":"","secret":"","recorder":false} request:undefined

Any idea what I’m doing wrong? My project is in Python, and I’m bypassing ssl on my REST api calls, in case that matters. I was wondering about that since the token starts with “wss://”.

Thanks.

  • Adam

This is resolved. I just needed to prevent the token from being encoded.