API:Userrights

Prefix: None Required Rights: None POST Only? No  Add/remove a user to/from groups

Parameters

 * add – Add the user to these groups.
 * Type: one of bot, sysop, bureaucrat, checkuser, steward, import, transwiki, uploader, ipblock-exempt</tt>, oversight</tt>, founder</tt>, rollbacker</tt>, accountcreator</tt>, editor</tt>, reviewer</tt>


 * reason – Reason for the change.
 * remove – Remove the user from these groups.
 * Type: one of bot</tt>, sysop</tt>, bureaucrat</tt>, checkuser</tt>, steward</tt>, import</tt>, transwiki</tt>, uploader</tt>, ipblock-exempt</tt>, <tt>oversight</tt>, <tt>founder</tt>, <tt>rollbacker</tt>, <tt>accountcreator</tt>, <tt>editor</tt>, <tt>reviewer</tt>


 * token – A userrights token previously retrieved through list=users . Type: string
 * user (required) – User name . Type: string

Errors Codes

 * badtoken – Invalid token.
 * mustbeposted – The userrights module requires a POST request.
 * noapiwrite – Editing of this wiki through the API is disabled. Make sure the $wgEnableWriteAPI=true; statement is included in the wiki's LocalSettings.php file.
 * notoken – The token parameter must be set.
 * nouser – The user parameter must be set.
 * readapidenied – You need read permission to use this module.
 * writeapidenied – You're not allowed to edit this wiki through the API.