From the course: Microsoft Teams Bot Development

Updating your bot registration

From the course: Microsoft Teams Bot Development

Updating your bot registration

- [Instructor] At this time, you should have a basic familiarity with the process of writing a bot and then deploying it and making it work in Microsoft Teams. The fact that you're running your bot in Microsoft Teams means that you can use some specific functionality that is unique to Microsoft Teams, like having a one to one chat, or chatting in a team. Perhaps getting the list of members in a team or channels and so on and so forth. Let me show a few of those examples, but before we do that, let's go ahead and set up the code on your machine. Now, at this point, if you've been following through my course, you should have a bot registered in Microsoft Teams already. Let me show you how my bot registration looks like. Now, you may have your registration in the Azure portal, that's okay. As long as the bot works, that's what matters. But, I want to do now, is I want to a. ensure that your set up matches mine. And b. That if we're going to start ngrok from scratch how do we go about changing the URL here and just ensuring that everything is in place before we move further. So, go ahead, from the previous chapter and grab the ending code. And, unzip that in a folder and run npm install. I have already done that, let me show how that looks like. So, in my C:/Developer Folder as you can see, I have a teamsbot Folder and yes I have ngrok too. Go ahead and open terminal and browse to that directory. So, I'm going to go to teamsbot and let's open this in vs code. Since, I have already done an NPM install, notice that I already had a node_modules folder present in here. Now, I have some logic in the bar, at this point, the logic is not important, but because we're going to replace it anyway. We're going to replace it with some teams specific code. So, ignore the logic for now. Let's just make sure that our bot actually runs. So, here, I'm going to do an npm start just like before, which will run the start command in my packet adjacent. This is exposing my site on port 3978. So, in another tab, I'm going to run ngrok http 3978. And, this is exposing the bot at f2c1c02c. So, let's go ahead and copy paste this URL. And, now let's go into my bot registration and update the URL here so we can continue our development. So, again, go to dev.botframework.com/bots. This is the old portal. If you're doing this in Azure, I'll show that next as well. But, in the old portal, you go to myCustomTeamsBot. Then you go to settings. Scroll down. And, replace this older URL with the new URL. And before we leave, let's go ahead and test this as well. So, click here and type search. And, hopefully the bot should respond at this time. Great.

Contents