1

I'm currently looking at the rocket.chat REST-API and can't find a way to prepare a IM-room for two users. Both users do not have the permission to create a direct message (missing create-d). But I do have a privileged admin/bot-user, which should connect them, at any time.

I tried to im.open a roomId with both user id's (I've noticed, that direct messaging rooms are groups, without name and concat(userid1, userid2) as id). But I always receive:

{
    "success": false,
    "error": "[invalid-channel]",
    "errorType": "invalid-channel"
}

The im.create method cannot be used, since I can't tell the API which two users I want to connect (the first is always "me"/the logged in user).

Using group.create would create a room with 3 members (user1, user2, me). Which isn't what I want either.

Is there a way to create a IM between two users? Without the permission "create-d" on these two?

Michael Hirschler
  • 2,345
  • 16
  • 28

0 Answers0