相关疑难解决方法(0)

从Postman发送消息给Microsoft Bot

我正在尝试向我创建并发布到azure服务的机器人发送消息,以便机器人可以开始向其某些用户发送消息.

我首先尝试在Postman上发出请求,然后我可以为该交互构建一个控制器.

我正在做以下要求:

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
Run Code Online (Sandbox Code Playgroud)

从此,我得到了承载授权的回应:

{
  "token_type": "Bearer",
  "expires_in": 3599,
  "ext_expires_in": 0,
  "access_token": "eyJ0eXA..."
}
Run Code Online (Sandbox Code Playgroud)

然后我继续以下请求:

POST https://skype.botframework.com/v3/conversations
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:...", //ID of the bot I want to send the message to
            "name": "Sp Bot"//Name of the bot I want to talk …
Run Code Online (Sandbox Code Playgroud)

botframework

7
推荐指数
1
解决办法
3646
查看次数

如何将我的python bot连接到microsoft bot连接器

我想写一个python bot,我知道是否可以将我的bot连接到microsoft bot连接器?

python bots botconnector

2
推荐指数
1
解决办法
4375
查看次数

标签 统计

botconnector ×1

botframework ×1

bots ×1

python ×1