MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/API
action=userrights
(main | userrights)
- Denna modul kräver läsrättigheter.
- Denna modul kräver skrivrättigheter.
- Denna modul accepterar endast POST-begäranden.
- Source: MediaWiki
- License: GPL-2.0+
Change a user's group membership.
Parametrar:
- user
User name.
- Type: user name
- userid
User ID.
- Type: integer
- add
Add the user to these groups.
- Värden (separerade med |): bot, sysop, bureaucrat, Autopatrolled, Rollback, Server Manager
- remove
Remove the user from these groups.
- Värden (separerade med |): bot, sysop, bureaucrat, Autopatrolled, Rollback, Server Manager
- reason
Reason for the change.
- Default: (empty)
- token
A "userrights" token retrieved from action=query&meta=tokens
For compatibility, the token used in the web UI is also accepted.
- Denna parameter är obligatorisk.
Examples:
- Add user FooBot to group bot, and remove from groups sysop and bureaucrat.
- api.php?action=userrights&user=FooBot&add=bot&remove=sysop|bureaucrat&token=123ABC [open in sandbox]
- Add the user with ID 123 to group bot, and remove from groups sysop and bureaucrat.
- api.php?action=userrights&userid=123&add=bot&remove=sysop|bureaucrat&token=123ABC [open in sandbox]