Trợ giúp về API MediaWiki

This is an auto-generated MediaWiki API documentation page.

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

action=userrights

(main | userrights)
  • Mô đun này cần quyền đọc.
  • Mô đun này cần quyền ghi.
  • Mô đun này chỉ có nhận các yêu cầu POST.
  • Source: MediaWiki
  • License: GPL-2.0+

Change a user's group membership.

Các tham số:
user

User name.

userid

User ID.

Type: integer
add

Add the user to these groups.

Các giá trị (phân tách bằng |): bot, sysop, bureaucrat, administrator, Kiu
remove

Remove the user from these groups.

Các giá trị (phân tách bằng |): bot, sysop, bureaucrat, administrator, Kiu
reason

Reason for the change.

Mặc định: (trống)
token

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

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

Tham số này là bắt buộc.
Các ví dụ:
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