API:Options

Token
To change options, an options token is required. It can be obtained as follows:

Changing options
Options can be changed using action=options.

Parameters

 * token: The token obtained in the previous request. Take care to urlencode the trailing  as.
 * reset: Resets all preferences to the site defaults.
 * change: Pipe-separated list of changes, formatted name=value (e.g. skin=vector), value cannot contain pipe characters.
 * optionname: A name of a option which should have an optionvalue set.
 * optionvalue: A value of the option specified by the optionname, can contain pipe characters.

A parameter change cannot be used to set a value which contains pipe character "|", as it is used by the API to separate options. If you need to set such value (for example user signature) use optionname & optionvalue pair.

Example
Note: In this example, all parameters are passed in a GET request just for the sake of simplicity. However, action=options requires POST requests; GET requests will cause an error.

Possible errors
In addition to the usual stuff:
 * code: notloggedin
 * info: Anonymous users cannot change preferences
 * code: nochanges
 * info: No changes were requested