Alternative endpoint for create users token for admin user

We have an external application that we want to integrate with Rocket.Chat with custom front end. All the users are currently registered in external application. The idea was to create users in Rocket.Chat with random password and then create one admin account. So once the user logs in the external application, use the admin account to create the token for the logged in user by using users.createToken api and then use the generated token for user to login in Rocket.Chat using websocket (real time api). But users.createToken api is deprecated and since we dont know the password of the logged in user, there is no way to have admin account generate the token for the logged in user. So wanted to check if there is any alternative to users.createToken api.

Server Setup Information

  • Version of Rocket.Chat Server: 6.9.2
  • Operating System: Windows
  • Deployment Method: docker
  • Number of Running Instances: 1
  • NodeJS Version: 14.21.3
  • MongoDB Version: 6.0.13
  • Firewalls involved: No

Upgrade, NOW.

Your server is at risk of being hacked.

Please make sure you follow updates- no, don’t ever use ‘latest’ but DO follow releases.

Regarding your query I am not sure. Please check the other API calls here:

https://developer.rocket.chat/apidocs/create-user

https://developer.rocket.chat/apidocs/generate-personal-access-token