users.add

This function adds a new user. The XML response will contain details of the newly created user.

Parameters
string api_key (required) your api key
string username (optional)
The name of the user as displayed in the userlist once logged on. If none is passed a random username such as User 63gd97g' is generated.
string firstname (optional)
The user's first name. May be empty.
string lastname (optional)
The user's last name. May be empty.
string email (optional)
The user's email address. May be empty.
integer roleid (optional)
The user's role. Default value: 10

Valid values:
100 = Admin
50 = Moderator
40 = Participant
30 = Participant
10 = Participant
(more information on roles)

If in doubt pass roleid 50 in order to give the user access to all controls. Note that rooms with autopromote turned on will promote all users to roleid 50.
string skypename (optional)
The user's Skype username. Setting this property to a valid Skype username will show a Skype icon next to the user's name once logged on to a Scribblar room. Other users can click the icon to call the user on Skype.
string avatar (optional)
A public URL pointing to the user's avatar (profile image). This image will show in the userlist. If left empty the default generic user graphic is shown.
Acceptable image formats are jpg, gif and png. The size of the image should be 22x22 pixels.

Sample return XML
(this returns the details of the newly created user)



Result explanation

string userid globally unique identifier for this user
string firstname user's first name
string lastname user's last name
string username the user's username
string email the user's emailaddress
numeric roleid this user's role id
string skypename the user's skype name
string avatar the user's profile image

Error Codes
If this function call does not succeed it returns one of the following error codes.

500 Internal server error, we have been notified and will investigate
615 Username taken
616 User with that email address already exists
628 Invalid email address

An example of an error response would be the following