Forum Discussion

norxnd's avatar
norxnd
Brass Contributor
Nov 05, 2020

How to create bot with Bot Framework

What am I trying to do:

Create a chatbot that will receive events like messages. Reply or do some action. These actions are editing Team channels/members.

What I have done already:

I have created a bot server with Flas and Bot Framework for Python

And I created a "bot account" in two ways:

  • Creating App Registry on Azure -> Creating Manifest on App Studio -> Upload it to teams
  • Creating App Registry on Azure -> Creating bot via dev.botframework.com/bots/new -> Open it in Teams.

In two cases, the bot is not working:

 

 

 

PermissionError: [Errno Unauthorized. Invalid AppId passed on token: ] <ID of App created in App Registrations>

 

 

 

Of course, it's working on Emulator. Hare is my server code: https://repl.it/@NORXND/teams?lite=true
I do not have an Azure subscription. Can someone tell me what am I doing wrong? And how to do it right? Thanks!

5 Replies

  • norxnd's avatar
    norxnd
    Brass Contributor

    The problem has been solved. You must create an app in App Studio and a new bot in the Bots tab. Get ID and generate a password and then add it to the Adapter class!

    • norxnd's avatar
      norxnd
      Brass Contributor

      Trinetra-MSFT 

      I have done it https://docs.microsoft.com/en-us/microsoftteams/platform/build-your-first-app/build-bot but there is the same problem. But now this ID is Bot ID from Bot menagement from VS Code!

  • norxnd's avatar
    norxnd
    Brass Contributor

    I think Im know why error occurs I think this ID must be from Bot Service not from App Registrations on Active Directory. if Im right, how to create this bot without subscription?

Resources