API:User group membership

Token
A user rights is required and can since MediaWiki 1.24 be obtained by.

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

Previously, to change a user's group membership, the required token would depend on the name of the user whose rights were being changed. A user rights token could be obtained as follows:

Adding users to and removing them from groups
Users can be added to groups or removed from them with action=userrights. Under normal circumstances, no specific rights are required to do this, but the user must have changeable groups available to them (see ). Blocked users require the userrights right, given only to bureaucrats by default.

Parameters
Only one of user or userid must be specified.

Possible errors
All errors are formatted as: