Openvidu android: Unable to join using token generated by backend server using Rest apis

Hai,
I have created an api which returns me Token from openvidu. I am using node client for generating token. When i call getToken() function in android Token Successfully generated. But when joinRoom function is called i got error like this.

{
“id”: 0,
“error”: {
“code”: 202,
“message”: “Unable to join session. Session sessionA cannot be found. Code: 202”
},
“jsonrpc”: “2.0”
}

this is my joinRoom input JSON;
{
“jsonrpc”:“2.0”,
“method”:“joinRoom”,“id”:“1”,
“params”:{“metadata”:"{“clientData”:
“Participant60”}",
“session”:“sessionA”,
“secret”:"",“platform”:“Android 28”,
“token”:“wss://xxxxxxxx.xxxxxxx.xxx?
sessionId=ses_Zhk3nBVg3Y&token=tok_KgMd9uOO5ZV0y59P&role=PUBLISHER&version=2.14.0&coturnIp=3.231.17.44&turnUsername=FZL3NF&turnCredential=uhzfqo&webrtcStatsInterval=30”}}

What is the problem please help me.

Hello,

try to rename the sessionId

Thanks for Your Reply. But i already try with different sessionId’s but the error is the same one.
(Unable to join session. session [sessionId] could not found).

You have to:

  1. Create a session

  2. Create a token with the sessionId that you created before.

If you try to get a token of a session that is not created before, you will have this error.

Check how to join a session

I Understood Your Concept. But I Implement Code on that way. To Create token i follow openvidu-js-node tutorial. When I’m Working on Localhost openvidu server it work perfectly. But when i generate token using Node js I have problem on join session.

Please share OpenVidu logs in both situations (when it works and when it doesn’t work) to understand what is going on.

Regards