MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

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

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.

Parameters:
user

Nama pengguna, alamat IP, atau rentang alamat IP untuk diblokir.

Type: user name
userid

User ID to block. Cannot be used together with user.

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)
tags

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

Values (separate with | or alternative):
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 alasan Serangan pertama.
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 reason Vandalism, 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]