SDKsFlutterEnterprise
Get call room token
Retrieve media room access credentials by room ID using the OpenIM Flutter SDK.
When the roomID is already known, invoke this method to retrieve or refresh the access credentials required by the media engine:
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
roomID | String | Yes | Target call room ID. |
Code example
final credentials = await OpenIM.iMManager.signalingManager
.signalingGetTokenByRoomID(roomID: roomID);
if (credentials.token?.isNotEmpty == true &&
credentials.roomID?.isNotEmpty == true) {
await mediaEngine.join(
roomID: credentials.roomID!,
token: credentials.token!,
liveURL: credentials.liveURL,
);
}Return value
A successful Future returns a SignalingCertificate object containing credentials for joining the call room.
| Field | Type | Description |
|---|---|---|
token | String? | Room authentication token required by the media engine. |
roomID | String? | Call room ID. |
liveURL | String? | Live media streaming server URL. |
busyLineUserIDList | List<String>? | List of user IDs currently busy on another line. |
Connect to the RTC media engine only after obtaining a non-empty token and valid room credentials. If the token expires during a reconnection attempt, invoke this API again to acquire a refreshed credential.
Was this page helpful?