SDKsiOSEnterprise
Retrieve room credentials
Retrieve credentials for joining a room by room ID with the OpenIM iOS SDK.
The parameter name in the public header is groupID, but the selector and underlying implementation both use it as a room ID:
[[OIMManager manager] signalingGetTokenByRoomID:roomID
onSuccess:^(OIMInvitationResultInfo * _Nullable credentials) {
if (credentials.roomID.length > 0) [self joinMediaRoom:credentials];
}
onFailure:^(NSInteger code, NSString * _Nullable message) {
[self showCallError:code message:message ?: @"Failed to retrieve room credentials"];
}];The success callback returns an OIMInvitationResultInfo. Connect the media engine after obtaining valid roomID, token, and liveURL values. Call this method again when the credentials expire.
Was this page helpful?