Twitter is one of the most popular social media platforms in the world. Used by almost 400 million people, it’s proven to be a vital tool to revolutionary movements, businesses and brands, organizers, politicians, individuals, and more.

While the most commonly known actions undertaken on Twitter are tweeting an individual tweet, liking another tweet, and retweeting another account’s tweet, Twitter actually has a robust API that makes it possible to use the platform in a wide variety of ways that are a lot more complex and far-reaching. One of the more popular ways to use Twitter is through the use of a Twitter bot. 

What is a Twitter Bot?

A Twitter bot is a type of software that utilizes the Twitter API (application programming interface) to automatically perform preset tasks like direct messaging other accounts, tweeting, liking, following, unfollowing, retweeting, following hashtags, and other Twitter-specific actions. Once built and programmed, a Twitter bot can perform the tasks it’s directed to do without any need for direct human involvement. 

There are numerous ways to make a Twitter bot, and many open-source online tools, like Tweepy—a free Python-based kit—are available. Twitter users can also write a bot with JavaScript, but we’re going to show you a very simple way to make a Twitter bot using Twitter’s developer tools and a Twitter bot app developed by Digital Inspiration. All you need to get started is a Twitter developer account and a Google account that you can associate with it. 

Make a Twitter Bot in Five Easy Steps

1. Open a Twitter Developer Account 

To open a Twitter developer account, you need to either start with an existing Twitter account or make a new Twitter account. It doesn’t matter whether the account will be for business or personal use. Either way, building a Twitter bot requires a Twitter profile. 

Twitter’s home page where users can create an account or sign-in to an existing one to create a Twitter bot.

Once you’ve created a profile (and verified it) or signed into an existing one, head to the Developer Portal at You’ll be asked for your name, the country you’re in, your dev use case, and whether or not you’re planning on making any Twitter content available to a government entity.

The Developer Portal where users who want to create a bot will be asked a few questions to set up a developer account.

Fill out the fields, and in the “What’s your use case?” dropdown, select “Making a bot”.

A closeup of Dev Portal questions including “What’s your use case?” which should be answered “Making a bot”.

Next, you must agree to their “Developer agreement & policy”. It’s long, but read it and either print it or save it as a PDF for your records. 

Twitter’s Developer agreement & policy which must be read and agreed to in order to make a Twitter app and bot.

Once you’ve accepted their terms, Twitter will then ask you to verify via the email you’ve associated with the developer account.  

Screenshot of “Time to verify your email” which appears after submitting the form that agrees to the developer agreement & policy.

Now you’re ready for the second step.

2. Create a Twitter App 

Once you’ve verified your email, you can begin creating your Twitter application. The first thing you’ll need to do is decide on an app name and enter it in the “App name” field. Once you’ve chosen a name and typed it in, click “Get keys”.

First step in creating a Twitter app on the Twitter Developer Platform where users must enter their app’s name.

After clicking “Get keys”, you’ll receive three unique Twitter keys: an API key, an API key secret, and a Bearer token. 

key bearer token image

Don’t lose them, because you’ll need them later for authentication. Click “Skip to dashboard”. You’ll be asked to double-check that you saved your keys and token. Confirm that you did. You’ve now successfully created your first Twitter app, and you’re on to step three.

 3. Edit the Twitter App Permissions

You should now find yourself at the Developer Portal Dashboard. 

It’s now time to edit your Twitter app’s permissions. This is necessary for the bot creation that will happen later. To edit the app’s permissions, click the gear symbol to the right of “Ready Bot” under “Project App”. 

Screenshot of the Developer Portal Dashboard where projects are listed, including the recently named app that will be used to make a Twitter bot.

Click “Edit” next to “App details”. 

Screenshot of the sample project, “Ready Bot” in the Developer Portal.

Here is where you can flesh out some more details about your app, such as the app description. You can also add an app icon.


Screenshot of what the portal looks like after clicking “Edit” where the app name, app icon, and description of the Twitter app can be updated.

Once you’re happy with your app details, scroll down to the bottom of the page, and click “Save”.


Screenshot of where the “Save” button is located on the “Edit” screen of the Twitter app.

From here, click “Set up” to get your user authentication settings configured.


Screenshot of where to click to set up user auth settings when creating the Twitter app that will be used to make the Twitter bot.

Now that you’re inside the user authentication settings, turn on authentication for 0Auth 2.0 and 0Auth 1.0a by clicking the toggle button to the right of each of them. When turned on, they should each be green with a checkmark in the center of the green as seen below.

Screenshot of user authentication settings, including 0Auth 2.0 and 0Auth 1.0a turned on with green toggle buttons and a checkmark.

Next, select the type of app you want from the dropdown menu. Since we’re building a Twitter bot, select “Automated App or bot” from the 0Auth 2.0 settings. In the 0Auth 1.0a settings, select “Read and write and Direct message”, so you have as many options as possible available for your Twitter bot.


Screenshot of 0Auth 2.0 settings & type of app, “Automated app or bot” and 0Auth 1.0a settings, “Read and write and Direct message”.

Next, fill out at least the “Callback url/Redirect url” and “Website url” in the General Authentication Settings. You can also add your organization’s name and include links to your privacy policy, terms of service, etc. 


Screenshot of where to enter Callback url/Redirect url and Website url for Twitter app and Twitter bot creation.

Click “Save”.


Screenshot of other options to fill, including a terms of service link, and where to click “Save” to move on to the next screen.

You’ll now receive your Client ID and Client secret, which will function as the user name and password for 0Auth 2.0 authentication. Save these in a secure location. Then click “Done”.

Screenshot of 0Auth 2.0 Client ID and Client secret to be used later in creating Twitter bot.Head back to the Dashboard.


4. Generate Access Token and Secret

Once you’re back at the Dashboard, find “Projects & Apps” on the left side of the screen. Select the name of your app. In this demo case, the name of our app is “Ready Bot”.


Screenshot of the demo project, “Ready Bot”, in the Developer Portal with two tabs, “Settings”, and “Keys and tokens”

Switch from the “Settings” tab to the “Keys and tokens” tab. Click “Generate,” which is located next to “Access token” and “secret.” You will use the Access token and the Access token secret in the next step, so be sure to copy them and save them in a secure location.


Screenshot of the “Keys and tokens” tab where the Access token and secret can be generated.

(You will once again be asked to confirm that you’ve saved each in a secure location. If you have, click “Yes, I saved them”.)


Screenshot of screen that asks whether Access token and Access token secret have been saved.

On to step five, the final step.


5. Programming your Twitter Bot

It’s now time to tell your Twitter bot what you want it to do. Open Digital Inspiration’s Twitter bots app. Click “Review Permissions” and select the Google account associated with your Twitter account.

 Screenshot of Digital Inspiration’s Google apps script Twitter Bots v2 “Review Permissions” popup for gaining access to the Twitter bot app.

Next, fill in the fields with the appropriate keys and tokens that you saved from earlier in the process when you set up your Twitter app. 

Digital Inspiration’s Twitter bot dashboard where keys, tokens, & secrets are entered & Twitter bot actions determined.

Specify the search criteria you want to use in the “Twitter Search” field. The app you built in the previous steps will then hunt and find this search phrase. If you want your bot to run at specific times, enter those times in the “Start Time” and “End Time” fields. 

Lastly, select the action you want your bot to perform. Options include sending private DMs, retweeting, quote tweeting, following tweeters or profiles, DMing new followers, and more. If you choose an option that requires predesignated text, like “Send Public Reply”, simply fill out the “Text” field to the right of the “Action” drop-down menu. Once you’ve filled everything out the way you want it. Click “Save”.


With Twitter’s powerful and convenient API—and Amit Agarwal’s Digital Inspiration Twitter bots app—making a Twitter bot is super-easy. Add powerful automation to your Twitter marketing and engagement strategies with your own Twitter bot today. 

Need a website to go along with your Twitter marketing strategy? Be sure to check out our website builder resource page.