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)
- Este módulo requiere permisos de lectura.
 - Este módulo requiere permisos de escritura.
 - Este módulo solo acepta solicitudes POST.
 - Fuente: MediaWiki
 - Licencia: GPL-2.0+
 
Change a user's group membership.
Parámetros:
- user
 Nombre de usuario.
- Tipo: nombre de usuario
 - userid
 ID de usuario.
- Tipo: entero
 - add
 Agregar el usuario a estos grupos.
- Valores (separados por |): bot, sysop, bureaucrat
 - remove
 Eliminar el usuario de estos grupos.
- Valores (separados por |): bot, sysop, bureaucrat
 - reason
 Motivo del cambio.
- Predeterminado: (vacío)
 - 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 es obligatorio.
 
Ejemplos:
- Agregar al usuario FooBot al grupo bot y eliminarlo de los grupos sysop y 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]