MediaWiki 1.37/Deprecation of legacy API token parameters

On October 7, 2021, the deprecated parameters that were used to obtain tokens in MediaWiki API were removed. If your script/tool/bot or gadget is using these deprecated parameters on Wikimedia Foundation wikis, it broke unless you migrate it before October 7, 2021.

Before MediaWiki 1.24 (2014, change 153110), API tokens were obtained by using various different "token" parameters in different Action APIs. In November 2014, these were deprecated, in favour of a central CSRF token query. The API responses for the deprecated features has included deprecation warnings for the past six years.

Affected features
Example deprecation warning: Subscribe to the mediawiki-api-announce mailing list for notice of API deprecations and breaking changes. Use Special:ApiFeatureUsage to see usage of deprecated features by your application.

What to use instead
Since 2014,  is the central way to obtain CSRF tokens from the API.

For example, to obtain a watch token and a patrol token, use: api.php?action=query&meta=tokens&type=watch|patrol For more examples and help, check out the API:Tokens manual on mediawiki.org.

Pywikibot
If you are using Pywikibot, you will need to upgrade to at least version 6.6.1, which contains a fix to no longer use these deprecated parameters.