From MediaWiki.org
Jump to: navigation, search
This page is a translated version of the page API:Tokens and the translation is 40% complete.

Other languages:
dansk • ‎Deutsch • ‎English • ‎español • ‎français • ‎日本語 • ‎polski • ‎română • ‎русский • ‎sicilianu • ‎中文
Diese Seite ist Teil der MediaWiki action API-Dokumentation.

MediaWiki action API

v · d · e

For the deprecated action module, see API:Tokens (action)API:Tokens (action).

Gets tokens required by data-modifying actions. If you request one of these actions without providing a token, the API returns an error code such as notoken. This module does not use a prefix. The csrf (cross-site request forgery) token corresponds to the majority of older tokens, like edit and move, that were retrieved using the API action tokens (deprecated in MediaWiki 1.24).


  • type: Type of token(s) to request. (Default: csrf)
    • csrf
    • watch
    • patrol
    • rollback
    • userrights
    • login 1.27+
    • createaccount 1.27+


Mögliche Fehler

In addition to the usual errors, other errors may be returned in the following format:

<?xml version="1.0"?>
<api batchcomplete="">
    <tokens xml:space="preserve">Unrecognized value for parameter <var>type</var>: XXX.</tokens>
    <tokens />

Possible errors include:

  • Unrecognized value for parameter type: XXX.

Siehe auch