API:Userrights

From MediaWiki.org
Jump to: navigation, search

Prefix: None Required Rights: None POST Only? No

Add/remove a user to/from groups

[edit] Parameters

  • add – Add the user to these groups.
Type: one of bot, sysop, bureaucrat, checkuser, steward, import, transwiki, uploader, ipblock-exempt, oversight, founder, rollbacker, accountcreator, editor, reviewer
  • reason – Reason for the change.
  • remove – Remove the user from these groups.
Type: one of bot, sysop, bureaucrat, checkuser, steward, import, transwiki, uploader, ipblock-exempt, oversight, founder, rollbacker, accountcreator, editor, reviewer
  • token – A userrights token previously retrieved through list=users. Type: string
  • user (required) – User name. Type: string

[edit] 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.
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox