Forum Discussion

voonsionglum's avatar
voonsionglum
Brass Contributor
Jul 21, 2020
Solved

Initiating a group chat

Hi,

We are trying to initiate a group chat with members in Teams.  We are using Postman to call the BotFramework REST API to start a group conversation.

 

Here is the payload we are using

{
	"type": "message",
	"isGroup": true,
	"members": [
		{
			"id": "Some Id"
		},
		{
			"id": "Some Id"
		}
	],
	"tenantId": "Some Id",
	"topicName": "test"
}

When we tried to execute the request, we get the following error

 

{
    "error": {
        "code": "BadSyntax",
        "message": "Incorrect conversation creation parameters"
    }
}

If we tried to initiate a conversation with only ONE member with the following payload, then everything works correctly

{
	"type": "message",
	"isGroup": false,
	"members": [
		{
			"id": "Some Id"
		}
	],
	"tenantId": "Some Id",
	"topicName": "test"
}

Can anyone advise what the proper syntax to creating a group chat in Teams with the BotFramework REST API?

 

Thank You

4 Replies

    • voonsionglum's avatar
      voonsionglum
      Brass Contributor

      Trinetra-MSFT the documentation at https://docs.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?view=azure-bot-service-4.0#conversationparameters-object did not specify which parameter is required.  Per the example where creating a 1:1 conversation with the REST API, the parameters were 

      {
      	"type": "message",
      	"isGroup": false,
      	"members": [
      		{
      			"id": "Some Id"
      		}
      	],
      	"tenantId": "Some Id",
      	"topicName": "test"
      }

      I only updated the parameters by changing "isGroup" to true and added another member's id in the "members" array.

       

      No bot Ids were were added to the "members" array

      • Trinetra-MSFT's avatar
        Trinetra-MSFT
        Iron Contributor

        voonsionglum , Group chat doesn't work, we tested this at our end. You can create 1:1 and channel conversation using API

Resources