I am trying to send a message to a bot that I created and published for azure services so that the bot can start messaging with some of its users.
I try to first execute requests on Postman so that I can then build a controller for this interaction.
I am making the following request:
POST https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded
Body:
grant_type:client_credentials
client_id: my_ms_app_id
client_secret: my_ms_app_secret
scope: https://api.botframework.com/.default
from this I get the carrier permission in the response:
{
"token_type": "Bearer",
"expires_in": 3599,
"ext_expires_in": 0,
"access_token": "eyJ0eXA..."
}
Then I move on to the following query:
POST https:
Content-Type: application/json
Authorization: Bearer eyJ0eXAi....
{
"bot": {
"id": "i don't have this id so i pass some string",
"name": "connector controller"
},
"isGroup": false,
"members": [
{
"id": "28:...",
"name": "Sp Bot"
},
{
"id": "i don't have this id so i pass some string",
"name": "connector controller"
}
],
"topicName": "News Alert"
}
In response, I get a conversation identifier that matches "id": "I do not have this identifier, so I pass some string": {"id": "I do not have this id, so I pass some string"}
Then I move on to the following POST request:
POST. https:
Authorization: Bearer eyJ0...
Content-Type:application/json
I get the following answer:
400 Bad Request
{
"error": {
"code": "ServiceError",
"message": "The conversationId 29... and bot .... doesn't match a known conversation"
}
}
, . , https://skype.botframework.com/v3/conversations .
, : https://skype.botframework.com/v3/conversations/.../activities serviceError.