MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

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

action=block

(main | block)
  • This module requires read rights.
  • This module requires write rights.
  • This module only accepts POST requests.
  • Source: MediaWiki
  • License: GPL-2.0-or-later

Blokir pengguna.

Specific parameters:
Other general parameters are available.
user

Nama pengguna untuk diblokir.

Tipe: pengguna, dengan salah satu dari nama pengguna, IP, Pengguna sementara, rentang IP dan ID pengguna (mis. "#12345")
userid
Deprecated.

Tentukan user=#ID.

Type: integer
expiry

Waktu kedaluwarsa. Dapat berupa waktu relatif (seperti 5 bulan atau 2 minggu) atau waktu absolut (seperti 2014-09-18T12:34:56Z). Jika diatur ke selamanya, tak terbatas, atau tidak pernah, pemblokiran itu tidak akan berakhir.

Default: never
reason

Alasan pemblokiran.

Default: (empty)
anononly

Blokir hanya pengguna anonim (seperti menonaktifkan suntingan anonim untuk alamat IP ini).

Type: boolean (details)
nocreate

Cegah pembuatan akun.

Type: boolean (details)
autoblock

Blokir alamat IP terakhir yang digunakan pengguna ini, dan semua alamat IP berikutnya yang mereka coba gunakan untuk menyunting.

Type: boolean (details)
noemail

Cegah pengguna mengirimkan surel melalui wiki. (Membutuhkan hak blockemail).

Type: boolean (details)
hidename

Hide the username from the block log. (Requires the hideuser right).

Type: boolean (details)
allowusertalk

Allow the user to edit their own talk page (depends on $wgBlockAllowsUTEdit).

Type: boolean (details)
reblock

Jika pengguna tersebut sudah diblokir, atur ulang setelah pemblokirannya.

Type: boolean (details)
watchuser

Watch the user's or IP address's user and talk pages.

Type: boolean (details)
watchlistexpiry

Watchlist expiry timestamp. Omit this parameter entirely to leave the current expiry unchanged.

Type: expiry (details)
tags

Change tags to apply to the entry in the block log.

Values (separate with | or alternative):
partial

Block user from specific pages or namespaces rather than the entire site.

Type: boolean (details)
pagerestrictions

List of titles to block the user from editing. Only applies when partial is set to true.

Tipe: judul halaman
Separate values with | or alternative.
Maximum number of values is 10.
Hanya menerima halaman yang ada.
namespacerestrictions

List of namespace IDs to block the user from editing. Only applies when partial is set to true.

Values (separate with | or alternative): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 102, 103, 710, 711, 828, 829
To specify all values, use *.
actionrestrictions

List of actions to block the user from performing. Only applies when partial is set to true.

Values (separate with | or alternative): create, move, thanks, upload
token

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

This parameter is required.
Examples:
Blokir alamat IP 192.0.2.5 selama tiga hari dengan sebuah alasan.
api.php?action=block&user=192.0.2.5&expiry=3%20days&reason=First%20strike&token=123ABC [open in sandbox]
Block user Vandal indefinitely with a reason, and prevent new account creation and email sending.
api.php?action=block&user=Vandal&expiry=never&reason=Vandalism&nocreate=&autoblock=&noemail=&token=123ABC [open in sandbox]