Expand my Community achievements bar.

SOLVED

PHP - create room for specific application

Avatar

Level 2

Hi!


I am creating room using PHP library and can not figure how to specify application for this room.

Now I have a default appliaction and MyFirstApp paid application, how i can specify "MyFirstApp" for new room?

1 Accepted Solution

Avatar

Correct answer by
Employee

If you need to create multiple "applications" for accounting purposes you can only do that from DevPortal. And you don't need to create an empty template. By default applications use the empty template.

When you create rooms from your server-side application you will use one of the names of the applications you created in advance as the template name.

View solution in original post

4 Replies

Avatar

Level 2

I need to create an empty room for this application, assign this room as template for this application and use application name as template for room that i want to create.

Avatar

Former Community Member

Hi,

So, when you create a room, you specify the roomName and the template/application name from which you want to create the room. So, to create a room with MyFirstApp application template, you should do something like

accountManager.createRoom("roomName","MyFirstApp") ; // this is for java, convert in php

If you don't specify anything in the second parameter, it will be created from default template, which is empty of any collectionnodes/nodes. Please go through Room Provisioning section in our Developer Guide for more details.

Hope this helps

Thanks

Hironmay Basu

Avatar

Former Community Member

If you want to create empty template, you might as well not pass anything in the second parameter for the createRoom function call in AccountManager. It will be created from default template which is empty.

Ideally, the way to go is, first create nodes/collectionnodes in a room that’s under default, then save that room as a application template and finally use that template to create new rooms. That way the new rooms will all have the collectionnodes/nodes you want.

Thanks

Hironmay Basu

Avatar

Correct answer by
Employee

If you need to create multiple "applications" for accounting purposes you can only do that from DevPortal. And you don't need to create an empty template. By default applications use the empty template.

When you create rooms from your server-side application you will use one of the names of the applications you created in advance as the template name.