From mediawiki.org

Global blocking[edit]

Allows you to create a new block, remove a block, or modify one.


  • target: Target IP address/range
  • expiry: How long block should last for
  • unblock: If set, will unblock the address/range
  • reason: (un)block reason
  • anononly: If set, the block will only affect anonymous users
  • modify: If set, the block will modify an existing block
  • token: Edit token


Note: Request must be POSTed.

Blocking indefinitely with the reason of "Cross wiki abuse"

<?xml version="1.0"?>
  <globalblock user="" blocked="" expiry="infinite" />

List global blocks[edit]

View a list of currently blocked IP addresses/ranges.


  • bgstart: The timestamp to start enumerating from
  • bgend: The timestamp to stop enumerating at
  • bgdir: The direction in which to enumerate (older, newer)
  • bgids: Pipe-separated list of block IDs to list (optional)
  • bgaddresses: Pipe-separated list of addresses to search for (optional)
  • bgip: Get all blocks applying to this IP or CIDR range, including range blocks. (Cannot be used together with bkusers. IPv4 CIDR ranges broader than /16 are not accepted; however, IPv6 ranges can be of any size less than /4)
  • bglimit: The maximum number of blocks to list
  • bgprop: Which properties to get (id|address|by|timestamp|expiry|reason|range)

Errors codes[edit]

  • cidrtoobroad: CIDR ranges broader than /16 are not accepted.
  • invalidtitle: Bad title 'title'.
  • readapidenied: You need read permission to use this module.


List all global blocks

    <globalblocks bgstart="2009-10-03T12:10:59Z" />
      <block id="2301" address="" />
      <block id="2297" address="" anononly="" />
      <block id="2296" address="" anononly="" />
      <block id="2287" address="" />
      <block id="2286" address="" />
      <block id="2280" address="" />
      <block id="2279" address="" />
      <block id="2278" address="" />
      <block id="2277" address="" />
      <block id="2276" address="" />


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

Globally block or unblock a user.

Specific parameters:
Other general parameters are available.

The target IP address.

This parameter is required.

If specified, will block or reblock the user. Determines how long the block will last for, e.g. "5 months" or "2 weeks". If set to "infinite" or "indefinite" the block will never expire.

Type: expiry (details)

If specified, will unblock the user.

Type: boolean (details)

The reason for blocking/unblocking.

This parameter is required.

Specify this if the block should only affect logged-out users globally.

Type: boolean (details)

Specify this if the existing block on the target should be modified

Type: boolean (details)

Block the IP locally as well

Type: boolean (details)

Revoke talk page access locally

Type: boolean (details)

Revoke email access locally

Type: boolean (details)

Specify this if the block should only affect logged-out users locally.

Type: boolean (details)

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

This parameter is required.