【问题标题】:Creating a bot connection via Azure ARM Rest API通过 Azure ARM Rest API 创建机器人连接
【发布时间】:2021-04-12 10:35:12
【问题描述】:

所以,我一直在尝试使用 Azure Rest API 创建一些资源。更具体地说,我正在尝试使用 Insomnia 创建机器人连接。请求和响应是这样的:

我正在使用 PUT 方法(如您所见),URL(已编辑敏感数据)如下:

https://management.azure.com/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.BotService/botServices/bot-poc-myweb/Connections/mywebbot?api-version=2018-07-12

错误表示未找到连接资源。好吧..这里没有惊喜,因为我有点想创造它。有谁知道可能出了什么问题?

【问题讨论】:

    标签: azure rest azure-resource-manager


    【解决方案1】:

    试试这个:

    请求网址:

    PUT https://management.azure.com/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.BotService/botServices/<bot_name>/Connections/<conn_name>?api-version=2018-07-12
    

    请求正文:

    {
        "location": "global",
        "properties": {
            "scopes": "<scopes>",
            "serviceProviderId": "30dd229c-58e3-4a48-bdfd-91ec48eb906c",
            "clientId": "<client id>",
            "clientSecret": "<secret>",
            "parameters": [
                {
                    "key": "clientId",
                    "value": "<client id>"
                },
                {
                    "key": "clientSecret",
                    "value": "<secret>"
                },
                {
                    "key": "tokenExchangeUrl",
                    "value": "<token exchange URL>"
                },
                {
                    "key": "tenantId",
                    "value": "<tenant id>"
                }
            ]
        }
    }
    

    结果:

    【讨论】:

      猜你喜欢
      • 2019-01-13
      • 2017-04-25
      • 2018-10-25
      • 2019-10-25
      • 2019-08-24
      • 2020-02-29
      • 2018-07-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多