API:Tokens

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

Parameters

 * type: the type of token requested. Options:
 * block
 * centralauth
 * delete
 * deleteglobalaccount
 * edit
 * email
 * import
 * move
 * options
 * patrol
 * protect
 * setglobalaccountstatus
 * unblock
 * watch

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

Possible errors include:
 * Unrecognized value for parameter 'type'
 * Action 'xxx' is not allowed for the current user