Configure Botkit and Twilio SMS

Setting up a bot for Twilio SMS is one of the easiest experiences for bot developers! Follow these steps carefully to configure your bot.

1. Install Botkit

You will need to install Botkit and run it before your bot can be configured with Twilio SMS.

2. Create a new bot in the Twilio Developer Console

Login and click Get Started in Twilio SMS Developer Console. You will be taken through the process of obtaining a number to use with your bot.

At this point you can use the Twilio wizard to help you create an application, or build one directly by clicking Messanging Services. You can give it a friendly, and chose Mixed for use case.

Check the box Process Inbound Messages and under request URL, type the name of your request url.

By default in Botkit, this is: https://*mybot.yoururl.com*/api/messages

3. Collect your tokens

Next, visit your console Dashboard and copy your Account SID and Auth Token. You will use these in the next step along with your assignedmobile number to setup Botkit.

4. Run your bot with variables set

Follow these instructions to run your bot locally, or by using a third-party service such as Glitch or Heroku.

You will need the following environment variables when running your bot:

You should now be able to text message your number the words Hello and receive a friendly reply back!

Additional resources

Read more about making bots for this platform in the Twilio Developer Portal.

Is something missing or out of date?

This file is managed on Github. click here to view the source, and send us a pull request with your improvements!

Back to top