Translations:Manual:Edit token/29/en

In 1.18 and higher, you do not need to retrieve the edit token using AJAX. It's available as $code1. Note that you need to have defined mediawiki.user as a ResourceLoader dependency for your module. It is recommended that you use the $code2 helper method, which automatically takes care of retries if the token has expired since the web page was loaded.