I am working with Microsoft TEAMS application and I need to add a call to my application. My questions:
-------------- QUESTION 1 --------------
I am trying to use the HelloWorld Web app (HW) from TEAMS application, but 'Unable to reach app' message appears.
I have my HW compiled (Microsoft.Teams.Samples.HelloWorld in Visual Studio 2017) running locally (browser opens in http://localhost:3333/)
And with ngrok I can access remotelly (https://5d4c6462.ngrok.io) ngrok http 3333 -host-header=localhost:3333
This HW client generates a .zip with 2 .png files and the manifest.json file
Then in my TEAMS app (left panel) I go to Apps-'Upload a custom app', browse and get that .zip. My HW is visible for my user
In 'Teams' tab, I select a Team (MyTeam) and in 'Manage Team'-Apps, I install HW app ('More apps' button), but do nothing with 'Bot'/'Tab' and 'Messaging' options (all of them have a 'Set up' button that seems to do nothing)
After that, in MyTeam I can see the HW app when I write @hello, and my commands from composeExtensions (manifest) are available
But when I enter a text, 'Unable to reach app' is displayed
I supponse my problem is in the manifest file, but I don't know where... Anything related with an ID? Really there is no Message Extension URL to access my application...
In my Visual project, 'Assembly Info' I have a GUID value: "f543a88..."
I have used this value in the manifest, for 'id', and for 'botId' in 'bots' and 'composeExtensions' The rest of the values in the manifest file are the ones by default
-------------- QUESTION 2 --------------
I have some concepts not really understood, even after reading the apps-bots docu...
- If I have an app (previous Hello World, for instance), i can upload it from Teams application (as explained above). And it can send messages to my application (or it will do when web application is found)
- But how can I do that with a running bot? For instance from .NET framework samples (such as EchoBot project in csharp_dotnetcore solution)? I mean that project has no manifest to upload, where commands are visible for TEAMS to display... Must I create an app from TEAMS and load this bot during creation process?
In HW sample app, i have an MessagesController : ApiController to receive mesages, and I can check if it is a Message Extension with
public async Task<HttpResponseMessage> Post([FromBody] Activity activity) { using (var connector = new ConnectorClient(new Uri(activity.ServiceUrl))) { if (activity.IsComposeExtensionQuery())
But can I check that in a BOT? AsFarAsIKnow, ActivityHandler are used to process received messages, with its methods (OnMessageActivityAsync, ...)
In an app like HW sample, is it possible to return something more complex than a text when a text is received? For instance, a Card
In a app manifest file, 'composeExtensions' have 'commands', where parameters are required (different types are available: text, date,...) But is it possible to create a command with no parameter? I mean maybe i just want to send a command to my application
Sorry If i.m saying anything with no sense, I am really new in TEAMS apps/bots...
Any help, please?
Thanks, Diego