API:User group membership/id

POST request untuk menambah atau menghapus pengguna dari grup, dengan demikian memberikan atau menghapus hak pengguna tertentu.



Contoh
To use this API, you first need to log in to verify your own user group membership. Only certain groups are granted the ability to alter user rights via this API. See for more details on logging in.

The query above applies to MediaWiki v1.24+; in older versions, the  token would depend on the name of the user whose rights were being changed. The query would be made like so:

For compatibility reasons, the API will also accept the token used in the web UI.

Whichever method you choose, once you have your token, you can use it to make your  request, as seen below.



Sample code


Kemungkinan kesalahan


Sejarah parameter

 * v1.23: Introduced



Catatan tambahan

 * By default, only users in the bureaucrat group can grant or remove user rights.
 * Some wikis allow non-bureaucrats to grant or remove rights on a limited basis, such as restricting those abilities to the user's own account.
 * If you do not possess the ability to grant or remove rights to the target user, the API will not throw an error; instead, the  and   fields in the response will simply contain empty arrays.



Lihat juga

 * - describes how user rights and group membership work in greater detail.
 * Special:ListGroupRights - lists all the rights and privileges conferred to each user group on a particular wiki.
 * Special:UserRights - a GUI way to add or remove user rights, available in wikis running v1.29+.
 * - gets information about a list of users, including their groups and rights.