SOLVED

Initiating a group chat

%3CLINGO-SUB%20id%3D%22lingo-sub-1535052%22%20slang%3D%22en-US%22%3EInitiating%20a%20group%20chat%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1535052%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EWe%20are%20trying%20to%20initiate%20a%20group%20chat%20with%20members%20in%20Teams.%26nbsp%3B%20We%20are%20using%20Postman%20to%20call%20the%20BotFramework%20REST%20API%20to%20start%20a%20group%20conversation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20the%20payload%20we%20are%20using%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%20%22type%22%3A%20%22message%22%2C%0A%20%22isGroup%22%3A%20true%2C%0A%20%22members%22%3A%20%5B%0A%20%20%7B%0A%20%20%20%22id%22%3A%20%22Some%20Id%22%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%22id%22%3A%20%22Some%20Id%22%0A%20%20%7D%0A%20%5D%2C%0A%20%22tenantId%22%3A%20%22Some%20Id%22%2C%0A%20%22topicName%22%3A%20%22test%22%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EWhen%20we%20tried%20to%20execute%20the%20request%2C%20we%20get%20the%20following%20error%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%20%20%20%20%22error%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22code%22%3A%20%22BadSyntax%22%2C%0A%20%20%20%20%20%20%20%20%22message%22%3A%20%22Incorrect%20conversation%20creation%20parameters%22%0A%20%20%20%20%7D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EIf%20we%20tried%20to%20initiate%20a%20conversation%20with%20only%20ONE%20member%20with%20the%20following%20payload%2C%20then%20everything%20works%20correctly%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%20%22type%22%3A%20%22message%22%2C%0A%20%22isGroup%22%3A%20false%2C%0A%20%22members%22%3A%20%5B%0A%20%20%7B%0A%20%20%20%22id%22%3A%20%22Some%20Id%22%0A%20%20%7D%0A%20%5D%2C%0A%20%22tenantId%22%3A%20%22Some%20Id%22%2C%0A%20%22topicName%22%3A%20%22test%22%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3ECan%20anyone%20advise%20what%20the%20proper%20syntax%20to%20creating%20a%20group%20chat%20in%20Teams%20with%20the%20BotFramework%20REST%20API%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20You%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1535052%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBot%20Framework%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Enodejs%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1537597%22%20slang%3D%22en-US%22%3ERe%3A%20Initiating%20a%20group%20chat%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1537597%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F493333%22%20target%3D%22_blank%22%3E%40voonsionglum%3C%2FA%3E%26nbsp%3BCould%20you%20please%20check%20the%20required%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fbot-service%2Frest-api%2Fbot-framework-rest-connector-api-reference%3Fview%3Dazure-bot-service-4.0%23conversationparameters-object%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Econversation%20Parameters%3C%2FA%3E%20are%20added%20in%20request%20body%20or%20not%3F%20Also%20please%20confirm%20if%20you%20are%20initiating%20the%20group%20chat%20with%20members%20only%20or%20there%20is%20Bot%20also%20included%20in%20that%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1537600%22%20slang%3D%22en-US%22%3ERe%3A%20Initiating%20a%20group%20chat%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1537600%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F371090%22%20target%3D%22_blank%22%3E%40Trinetra-MSFT%3C%2FA%3E%26nbsp%3Bthe%20documentation%20at%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fbot-service%2Frest-api%2Fbot-framework-rest-connector-api-reference%3Fview%3Dazure-bot-service-4.0%23conversationparameters-object%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fbot-service%2Frest-api%2Fbot-framework-rest-connector-api-reference%3Fview%3Dazure-bot-service-4.0%23conversationparameters-object%3C%2FA%3E%26nbsp%3Bdid%20not%20specify%20which%20parameter%20is%20required.%26nbsp%3B%20Per%20the%20example%20where%20creating%20a%201%3A1%20conversation%20with%20the%20REST%20API%2C%20the%20parameters%20were%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%7B%0A%20%22type%22%3A%20%22message%22%2C%0A%20%22isGroup%22%3A%20false%2C%0A%20%22members%22%3A%20%5B%0A%20%20%7B%0A%20%20%20%22id%22%3A%20%22Some%20Id%22%0A%20%20%7D%0A%20%5D%2C%0A%20%22tenantId%22%3A%20%22Some%20Id%22%2C%0A%20%22topicName%22%3A%20%22test%22%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EI%20only%20updated%20the%20parameters%20by%20changing%20%22isGroup%22%20to%20true%20and%20added%20another%20member's%20id%20in%20the%20%22members%22%20array.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENo%20bot%20Ids%20were%20were%20added%20to%20the%20%22members%22%20array%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1663618%22%20slang%3D%22en-US%22%3ERe%3A%20Initiating%20a%20group%20chat%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1663618%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F493333%22%20target%3D%22_blank%22%3E%40voonsionglum%3C%2FA%3E%26nbsp%3B%2C%20Group%20chat%20doesn't%20work%2C%20we%20tested%20this%20at%20our%20end.%20You%20can%20create%201%3A1%20and%20channel%20conversation%20using%20API%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

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

3 Replies
Highlighted

@voonsionglum Could you please check the required conversation Parameters are added in request body or not? Also please confirm if you are initiating the group chat with members only or there is Bot also included in that

Highlighted

@Trinetra-MSFT the documentation at https://docs.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-api-referen... 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

Highlighted
Best Response confirmed by voonsionglum (Contributor)
Solution

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