Community Central
Community Central

In order to use bots, external tools or scripts such as AutoWikiBrowser or Pywikibot, a special set of login credentials needs to be generated first. This is done by logging in via the account where your bot edits normally come from and then navigating to Special:BotPasswords, which is accessible at any Fandom/Gamepedia wiki. Once the new bot login credentials are generated at a wiki, they are global to all other Fandom/Gamepedia wikis as well.

Benefits and restrictions[]

This system has several benefits:

  • A bot login grants access to the MediaWiki API without having to enter or save your account's main login credentials in a script or app.
  • Users can restrict their bot logins' editing permissions.
  • A single user can create multiple bot login credentials for separate scripts, apps, etc, each with its own custom set of editing permissions.
  • If a user's bot credentials are ever lost or compromised, the user can easily revoke them without having to change their main account password.

However, a bot run through a script doesn't have the same editing process as a regular user logged in through their web browser.

  • Bot logins are only accepted via HTTPS. Bot logins from the non-secure HTTP protocol will be rejected.
  • Bot logins can only access the MediaWiki API, not the normal web wiki interface.

What does this mean for me?[]

Your regular web account credentials can only be used to log in via the ordinary web interface. They cannot be used to log in via external tools or scripts.

If you use a third-party tool for editing wikis, you will need to generate new credentials via Special:BotPasswords while logged in from the account that does your bot editing.

  • NOTE: This process is not exclusive to accounts that are flagged as bots. Any account that logs in via a third-party tool will need to follow this process.

Using Special:BotPasswords[]

Recommended Permissions
High-volume editing
Edit existing pages
Create, edit and move pages
The above should be sufficient for most bots. The "Usage restrictions" field at the bottom doesn't usually need to be modified.
  1. Log in to a Fandom/Gamepedia wiki via the regular web interface using the account where you want your bot edits to show up. Users with separate accounts for web editing and bot editing should log in via their bot account rather than the one they use for normal web editing.
  2. Navigate to Special:BotPasswords on any Fandom/Gamepedia wiki.
  3. Fill in a "Bot name". For example: AWB if the password is for logging into AWB. This name will be added as a suffix to your currently logged-in username, for example: Template:Userexample@AWB.
  4. Select the desired permissions for this bot login (see recommendations in the table to the right).
    • Note: You can only successfully grant permissions that your web account already has. For example, attempting to grant the "delete pages" permission and then using these bot credentials to edit a wiki where your web account is not an administrator or above will not actually grant your bot the ability to delete pages at that wiki.
  5. Click "Create".
  6. The bot username and generated password are displayed. This password will only be displayed on this page. Once you navigate away from this page or reload it, the password will not be retrievable.

Using your newly-created bot credentials[]

Configure your external script or app to log in using the secure HTTPS protocol.
Bot logins from HTTP will be rejected!

Enter the credentials you just generated via the steps above (instead of your main account credentials) and set your tool to log in via HTTPS.

Edits with these bot credentials will show up as coming from the parent username that created the bot login. For example, an edit made by Template:Userexample@MyRobot will show up in the Contributions of Template:Userexample and will display in Recent Changes, page histories, etc. as edits made by Template:Userexample.

If you receive an error message when attempting to log in with certain tools, like AutoWikiBrowser, please use the following alternative login format instead (shown in Special:BotPasswords when creating a new bot or resetting its password): Template:Userexample as username and MyRobot@password as password.

For certain scripts and tools — including AutoWikiBrowser — it may be necessary to use an alternative login format:
Template:Userexample as username and MyRobot@password as password.

Managing an existing bot password[]

To manage an existing bot login, go to Special:BotPasswords on any Fandom/Gamepedia wiki and select a bot name.

  • To reset the bot login password, select "Reset the password" and click "Update".
  • To change the bot login's permissions, select or deselect the appropriate permissions in the displayed list and click "Update".
  • To delete the bot password, click "Delete".

Best practices[]

The following is all optional and, if you're feeling confused, you shouldn't bother reading this (at least yet).

  • Name passwords after machines + use cases (e.g. "Desktop AWB" or "Laptop PWB").
  • Never share a password across machines - if one machine's security is compromised, you don't want to have to reset your password in every single application on every single machine.
  • Similarly, don't share passwords across applications; PWB, AWB, etc. should all have their own bot password.
  • Remember not to include your bot password in any code that you share in any way!! Put your password in a text file that's included in your .gitignore.
  • Don't give both "edit site CSS & JS" and "high-volume editing" to the same password. If you ever need to do batch edits of CSS or JS pages and you know in advance you will be doing this, you can either temporarily add the right as needed or make a new password that has both but, after you're done with that task, you should revert the rights or delete the temporary password. This is a good way to ensure you never accidentally cause sweeping code issues because you had a mistake in a regular expression or something.

See also[]