Wikipedia:WikiProject User scripts/Guide/Ajax: Difference between revisions
Content deleted Content added
No edit summary |
Christian75 (talk | contribs) →Edit a page and other common actions: clean up, typos fixed: etc) → etc.) using AWB |
||
Line 24:
</source>
===Edit a page and other common actions===
Scripts can perform common actions (like editing, protection, blocking, deletion, etc.) through the [{{SERVER}}/w/api.php API]. These actions require an edit token, which is valid for any action during the same session. (However, you should get a new token for different tasks in case this changes in the future.)
The code below shows how to edit a page, but it can easily be adapted to other actions by reading the [{{SERVER}}/w/api.php API documentation].
|