Skype Bot sending message (not a reply)

1.6k views Asked by At

Trying to create a Skype Bot, but I have a problem. Please, help me. I use PHP so I use REST (not NodeJS or C# SDK). The task: I have to send data from html form on my website to Skype (so I don’t have to reply to a message, but just send). Well, I have successfully create a bot in Microsoft Bot Framework. Then I have successfully received an access_token. Then they say in docs that I have to send a POST to:

/v3/conversations/{conversationId}/activities

According to https://learn.microsoft.com/en-us/bot-framework/rest-api/bot-framework-rest-connector-send-and-receive-messages I have to send a request to /v3/conversations with JSON like that:

{
"bot": {
"id": "12345678",
"name": "bot's name"
},
"isGroup": false,
"members": [
{
"id": "1234abcd",
"name": "recipient's name"
}
],
"topicName": "News Alert"
}

But what is the "member's id and member's name"?

1

There are 1 answers

1
Suneesh Jacob On

To get the member ids of some members, add all those members in a group and add the bot, too, to the group and preferably send a message in the group, mentioning the bot. You will receive a json with a conversationId. With this conversationId, make a get request to v3/conversations/{conversationId}/members in order to receive the member-ids and member-names of the members in the group.

You can now proceed with these member-ids and member-names to start individual conversations with the members (which is illustrated in my answer to this question).