Ajuda API da MediaWiki

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/API

action=userrights

(main | userrights)
  • This module requires read rights.
  • This module requires write rights.
  • This module only accepts POST requests.

Change a user's group membership.

Parâmetros:
user

Nome de utilizador(a).

userid

ID de utilizador.

add

Adicionar o utilizador a estes grupos.

Values (separate with |): bot, sysop, bureaucrat
remove

Remover este utilizador destes grupos.

Values (separate with |): bot, sysop, bureaucrat
reason

Reason for the change.

Padrão: (vazio)
token

A "userrights" token retrieved from action=query&meta=tokens

For compatibility, the token used in the web UI is also accepted.

Este parâmetro é obrigatório.
Exemplos:
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
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