Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

how to create dynamic room in runtime execution?

Avatar

Level 2

Hello All,

Can you please suggest me how can I create dynamic room in runtime execution? I do not want to create fixed room from the room consol. I want to create a new room & also delete it after work complete in runtime execution.

thanks,

krish

1 Reply

Avatar

Employee

Hi Krish,

If you are using your own server to do ExternalAuthentication, then you can

user server to server API's to do that. Please refer to Server2Server apps

in the SDK's sample apps folder.

Else you might have to use AccountManager with room

owner credentials. But the Server2Server aprroach is highly recommended.

                private var acctMgr:AccountManager = new AccountManager();
                acctMgr.accountURL = m_accountURL;
                acctMgr.authenticator = authenticator;
                acctMgr.addEventListener(AccountManagerEvent.LOGIN_SUCCESS, authenticateSuccess);
                //acctMgr.addEventListener(AccountManagerEvent.LOGIN_FAILURE, authenticateFailure);
                //acctMgr.addEventListener(AccountManagerEvent.ACCESS_ERROR, onAuthenticationAccessError);
                   
                public function authenticateSuccess(event:AccountManagerEvent):void {
                   acctMgr.addEventListener(AccountManagerEvent.ROOM_DELETE, onRoomDelete);
                   acctMgr.deleteRoom(name, template);
                }
               
                public function onRoomDelete(event:AccountManagerEvent):void {

                }

Thanks

Arun