API:Tokens (action)/zh

Tokens can be obtained using action=tokens. These tokens can then be used in other API requests.

参数


The Central Auth extension on MediaWiki servers adds the following tokens:

可能的错误
In addition to the usual errors, other errors may be returned in the following format:

可能的错误包括：

Failing to urlencode the token can result in an invalid token error.

Important Note
You need to send the cookie obtained in the login phase when you call the api with the "tokens" action; otherwise you get the cryptic "readapidenied" error.