Due to a security issue,[1] the deprecated "gettoken" parameter to action=block and action=unblock has been removed. Clients should use action=tokens to fetch tokens of types "block" or "unblock" instead.
This also applies to the security release 1.21.2.
[1]: https://bugzilla.wikimedia.org/show_bug.cgi?id=49090
mediawiki-api@lists.wikimedia.org