Building a bot with Botkit and the Microsoft Teams API gives you access to all of the best tools and options available to create a feature-rich app for Teams.
We've created the following guide to help you configure your Microsoft Teams bot.
Microsoft Teams first requires you to register with their "Bot Framework" before you can add a bot to your Teams team. This is a multi-step process:
Log into the Bot Framework Developer Portal using your Microsoft credentials, or create an account.
Once you are logged in, click this link to create a new bot and then you can skip the next two steps!
My Botsand then Register. Choose
Create a bot with the Bot Builder SDK, and click
Register an existing bot built using Bot Builder SDKfrom the next menu and then click
You will be asked some questions about your bot. Some of these can be changed later, but some cannot be changed so consider your responses carefully!
These are the important fields when creating your bot:
Display name- Your bot's name in channels and directories. This can be changed later.
Bot handle- This will be used in the URL for your bot. Note: This cannot be changed.
Messaging endpoint- You may not know this yet, as you will be creating this in the next step when setting up the Botkit app. If you are using the Botkit starter kit, by default it is:
https://YOURURL/teams/receive. Feel free to make anything up, you can come back later and change it.
Register your bot with Microsoft by clicking:
Create Microsoft App ID and password
This action will take you to a new website (and require you to log in again) and then ask you for an
Once added, it will provide an
App ID which you need to copy somewhere safe to use in the next step.
Generate password. This will only be shown to you once, if you lose it, you will need to invalidate the old one and set this up again!
Add the Microsoft Teams channel from the list of channels, making sure the
Enabled is set to on.
You will want to leave this window open as you finish setting up Botkit, as you will need to come back here before you are done.
Now that everything is setup on Microsoft's side, you can run Botkit using the method you've chosen and with the information created in the Bot framework in the previous step.
Once a Botkit instance is running, you may have a new URL that you will have to update in the bot's settings in Microsoft Bot Framework.
Once logged in to that page:
- Click on your bot
- Select settings
- Scroll down to the messaging endpoint field and replace the placeholder URL with your active Botkit URL (it should look something like
- Click Save.
To add a development bot on a team, you will need to prepare an App Package.
After creating your app package, you can load it easily into your development team.
Say hello to your real live bot!
Once you have a bot up and running, you can start the fun part of making your bot functional.
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!