From OpenSimulator

Revision as of 20:42, 16 March 2012 by Justincc (Talk | contribs)

Jump to: navigation, search



Normally, users are created in OpenSimulator via commands on the region console (in standalone configuration) or on the ROBUST service console (in grid configuration). However, users can also be created by making an XMLRPC call directly to the ROBUST service. This facility has been available since OpenSimulator 0.7.3. It can currently only be used in grid configuration.


The listener for the createuser XMLRPC call on ROBUST has to be explicitly enabled. In the [UserAccountService] section of Robust.ini, set AllowCreateUser = true like so.

AllowCreateUser = true

Please be aware that this will expose the call on the UserAccountServiceConnector as listed in the ServiceConnectiors parameter in the [Startup] section at the top of the file. The default port used (8003) is one that should not be exposed to other users. For logging into OpenSimulator you only need to expose the port that is running the LLLoginServiceInConnector (8002 by default).


Setting AllowCreateUser = true will expose the create user XMLRPC function. Here's an example python program of how to call this.


import httplib
import urllib

params = urllib.urlencode({'METHOD':'createuser', 'FirstName':'Fred', 'LastName':'Flintstone', 'Password':'test', 'PrincipalID':'3a1c8128-908f-4455-8157-66c96a46f75e'})
conn = httplib.HTTPConnection("localhost", 8003);
conn.request("POST", "/accounts", params)
response = conn.getresponse()

PrincipalID is the unique ID of the user.

If everything goes well, you should get back

<?xml version="1.0"?>
  <result type="List">

Don't worry about ScopeID, this is used for allow multiple grids to co-exist inside a single database. Created is a unix timestamp of the time the user was created. UserLevel determines whether the user is a god (>= 200) or can log in at all (<0). ServiceURLs are HyperGrid related and do not concern us here.

If the call fails you will get the response

<?xml version="1.0"?>
Personal tools
About This Wiki