⧼api-help-title⧽
action=userrights
(main | userrights)
- ⧼api-help-flag-readrights⧽
- ⧼api-help-flag-writerights⧽
- ⧼api-help-flag-mustbeposted⧽
- ⧼api-help-source⧽
- ⧼api-help-license⧽
- user
- ⧼apihelp-userrights-param-user⧽
- Type: user, by any of username and user ID (e.g. "#12345")
- userid
- ⧼api-help-param-deprecated⧽
- ⧼apihelp-userrights-param-userid⧽
- Type: integer
- add
- ⧼apihelp-userrights-param-add⧽
- Values (separate with U+007C (pipe), or prefix the list with U+001F and separate with U+001F): bot, bureaucrat, interface-admin, suppress, sysop
- expiry
- ⧼apihelp-userrights-param-expiry⧽
- Separate values with "|", or prefix the list with U+001F and separate with U+001F.
- Maximum number of values is 50 (500 for clients that are allowed higher limits).
- Default: infinite
- remove
- ⧼apihelp-userrights-param-remove⧽
- Values (separate with U+007C (pipe), or prefix the list with U+001F and separate with U+001F): bot, bureaucrat, interface-admin, suppress, sysop
- reason
- ⧼apihelp-userrights-param-reason⧽
- Default: (empty)
- token
- ⧼api-help-param-token⧽⧼api-help-param-token-webui⧽
- This parameter is required.
- tags
- ⧼apihelp-userrights-param-tags⧽
- Values (separate with U+007C (pipe), or prefix the list with U+001F and separate with U+001F):
- ⧼apihelp-userrights-example-user⧽
- api.php?action=userrights&user=FooBot&add=bot&remove=sysop|bureaucrat&token=123ABC ⧼api-help-open-in-apisandbox⧽
- ⧼apihelp-userrights-example-userid⧽
- api.php?action=userrights&userid=123&add=bot&remove=sysop|bureaucrat&token=123ABC ⧼api-help-open-in-apisandbox⧽
- ⧼apihelp-userrights-example-expiry⧽
- api.php?action=userrights&user=SometimeSysop&add=sysop&expiry=1%20month&token=123ABC ⧼api-help-open-in-apisandbox⧽