From the course: Microsoft Teams Bot Development

Exposing the bot using ngrok

From the course: Microsoft Teams Bot Development

Exposing the bot using ngrok

- [Narrator] So my bot is currently registered with Microsoft Teams. I have the app ID, I have the password. Let's go make the code changes necessary for my bot to authenticate with Teams. Now, these bot details, I hope you kept them safe somewhere, because we're going to need them now. This app ID, let's go to index digest. Let's place that here. And the password, let's place it here. Great. Now, let's go ahead and run my project. The code changes are done. So I'm going to go to commander, or whatever terminal you're using, and say npm start. And my bot is running on port 3978. But the next thing I need to do is that I need to register my bot with ngrok, and update the URL. So I'm going to open a new tab here, and I'm going to expose my port 3978 on the Internet, on initiative BS channel. And I'm going to take this https URL, the ngrok URL, and I'm going to go back to my bot registration, and I'm going to update the messaging endpoint like this, /api/messages, because that's the structure for my bot. And then I'm going to go down here and choose to Save these changes. With my changes saved, at this point, I am ready to test my bot. The first test I will do at this point, is to simply visit this URL, and make sure that the request are making it to my machine. Hit Enter, and looks, if you see this message, that means a bot framework answered. You can also go to the ngrok output here, and you should see a similar message here.

Contents