【问题标题】:Microsoft Face API - Error 401, iOSMicrosoft 人脸 API - 错误 401,iOS
【发布时间】:2018-01-06 08:36:36
【问题描述】:

我在我的应用中使用了订阅 ID,但在运行时出现以下错误。

Error Domain=POFaceServiceClient error - http response is not success : 
                {"error":{"code":"Unspecified","message":"Access denied due to invalid subscription key. Make sure you are subscribed to an API you are trying to call and provide the right key."}}
                     Code=401 "(null)"

创建新服务后,我从 Keys 中获取了 ID。我什至重新生成了它们。每次我运行程序,都会抛出同样的错误。

希望你们有解决办法。

干杯!

【问题讨论】:

  • 是的!去过也做过。没用!
  • 您的 API 密钥适用于美国西部吗? github sample 被硬编码到 westus。
  • 没有。它不是。我选择了西南亚选项。
  • 您更改了ProjectOxfordFaceEndpoint 以反映这一点?应该是https://southeastasia.api.cognitive.microsoft.com/face/v1.0/

标签: ios swift microsoft-cognitive face-api


【解决方案1】:

我终于可以修好了。 :)

在创建 API KEY 时,只需确保您提供 westus 服务器,并且端点应该是:

https://westus.api.cognitive.microsoft.com/face/v1.0

就我而言,它有效。

【讨论】:

  • 这就是我当时最终做的事情! :)
猜你喜欢
  • 1970-01-01
  • 2019-05-23
  • 2016-08-09
  • 2018-06-01
  • 2018-12-31
  • 1970-01-01
  • 2018-12-13
  • 2021-10-04
  • 2020-10-24
相关资源
最近更新 更多