MediaWiki API ヘルプ

このページは自動生成された MediaWiki API の説明文書ページです。

説明文書と例: https://www.mediawiki.org/wiki/API

action=userrights

(main | userrights)
  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。

Change a user's group membership.

パラメーター:
user

User name.

userid

User ID.

add

Add the user to these groups.

値 (|で区切る): bot、sysop、bureaucrat
remove

Remove the user from these groups.

値 (|で区切る): bot、sysop、bureaucrat
reason

Reason for the change.

既定値: (空)
token

action=query&meta=tokens から取得した「userrights」トークン

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

このパラメーターは必須です。
例:
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