How to Write a Twitter Bot in 5 Minutes

Twitter Bots can do interesting things. For instance, a grammar bot can monitors tweets containing misspellings and tweet the correct spelling. You can tweet questions to

Step A: Make an App for the Twitter Bot

  1. Create a new account at Twitter that will work as a bot. Then go to, sign-in with your new Twitter account and create a Twitter application. Give your app a name, description and put any URL in the website field. Agree to the developer terms and submit the form.
  2. Once the Twitter app has been created, click Modify App Permissions under Application Settings and change the access level to Read, Write and Access Direct Messages.
  3. Next switch to the Keys and Access Tokens tab and click the Create My Access Token button. Twitter will generate the Consumer Keys and Access tokens that we will need in a next step.

Step B: Configure your Twitter bots

  1. Go to to open the Twitter bots application.
  2. Enter the Twitter Consumer Key, Consumer Secret, Access Token and Access Secret that were generated in the previous step.
  3. Next, you need to specify the search phrase for the bots. The app will find all new tweets that match this search phrase and process them all, one at a time.
  4. Click Save to initialize the Twitter bot. That’s it. The bots are now initialized and they’ll auto-run in the background.

Twitter Bots Video Tutorial

Please watch the Twitter Bots Video Tutorial (download) for a more detailed getting started guide. It is important to note that Twitter TOS discourages automation so you may want to test the waters with a test Twitter account.

Twitter provides certain automation rules but the gist is that your bots should not be used for spamming. Here are some legitimate uses cases where automated Twitter bots can prove handy:

  • If you are changing your Twitter username, set an auto-DM bot for the old account so your new followers get to know your new screen name.
  • If you are offline during specific hours, setup out of office replies so people can expect a delayed response.
  • You can follow users or add them to a Twitter list who tweet on particular topics or whose Twitter profile (bio) matches your search criteria.

Visit the Twitter Bots page to learn more about the premium features.

Powered by WPeMatico