API:Account creation/pre-1.27

Token
To create an account, a token is required.

Creating accounts
It will be possible to create accounts with action=createaccount after development of ApiCreateAccount.php is complete and the code is merged into the trunk. Presently, it does not work.

Parameters

 * : User name
 * : Password (ignored if  is set)
 * : Domain for external authentication (optional)
 * : Account creation token obtained in first request
 * : Email address of user
 * : Real name of user
 * : If set to any value, random password will be generated and e-mailed to the user
 * : Optional reason for creating the account
 * : Language code to set as default for the user

Example
Note: In this example, all parameters are passed in a GET request just for the sake of simplicity. However, action=createaccount requires POST requests; GET requests will cause an error.

Possible errors
All errors are formatted as:


 * code: wrongpassword
 * info: Incorrect password entered.
 * code: sessionfailure
 * info: Token was incorrect, so add it to result, but don't throw an exception.
 * code: sorbs_create_account_reason
 * info: Your IP address is listed as an open proxy in the DNSBL.
 * code: noname
 * info: You have not specified a valid username
 * code: userexists
 * info: Username entered already in use
 * code: password-name-match
 * info: Password is same is username
 * code: password-login-forbidden
 * info: The use of this username and password has been forbidden
 * code: noemailtitle
 * info: No email address
 * code: invalidemailaddress
 * info: The e-mail address cannot be accepted as it appears to have an invalid format
 * code: externaldberror
 * info: There was either an authentication database error or you are not allowed to update your external account
 * code: passwordtooshort
 * info: The password was shorter than the value of $wgMinimalPasswordLength
 * code: noemail
 * info: There is no e-mail address recorded for user
 * code: mustbeposted
 * info: The createaccount module requires a POST request

Disable
To disable specificaly this API feature, insert the following line in your configuration file: