You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`userId`|`string`| The Rocket.Chat user ID of the logged-in user|
45
+
|`authToken`|`string`| The Meteor login token (session token) for the user |
46
46
|`serverUrl`|`string`| The origin of the Rocket.Chat server (e.g., `https://chat.example.com`) |
This works without any special server configuration.
82
-
83
-
### Option B: `postMessage` Command
84
-
85
-
After the iframe loads, send a postMessage to trigger login:
86
-
87
-
```javascript
88
-
iframe.contentWindow.postMessage({
89
-
externalCommand:'login-with-token',
90
-
token: authToken,
91
-
}, serverUrl);
92
-
```
93
-
94
-
This requires the Rocket.Chat server setting **Iframe_Integration_receive_enable** to be set to `true`.
95
-
96
50
## Multi-Workspace Support
97
51
98
52
The credentials are always captured from the specific Rocket.Chat workspace that initiated the video call. If the user is connected to multiple workspaces, the correct `userId`, `authToken`, and `serverUrl` for the calling workspace are returned.
0 commit comments