操作返回了无效的状态码“未经授权”

时间:2019-12-05 07:37:03

标签: azure botframework

我正在尝试使用从天蓝色门户复制的密钥访问天蓝色资源(QNA):

           // <Authorization>
              var subscriptionKey = Environment.GetEnvironmentVariable("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx");
        var client = new QnAMakerClient(new ApiKeyServiceClientCredentials(subscriptionKey)) { Endpoint = "https://westus.api.cognitive.microsoft.com/" };
        // </Authorization>

        // <EndpointKey>
        var endpointhostName = Environment.GetEnvironmentVariable("iakpmgpoc.azurewebsites.net");
        var endpointKey = Environment.GetEnvironmentVariable("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx");

仍然出现“未经授权的访问”问题

0 个答案:

没有答案