我正在尝试从 Microsoft FACE API 进入 API。我在 Azure 上创建了一个帐户并创建了他们为我提供密钥的服务。关键是我正在尝试访问 API 并且一直是 401 错误
let client = MPOFaceServiceClient(subscriptionKey: "MY_API_KEY")
所有时间都返回相同的错误:
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)"
IOS中几乎没有API的文档,然后它只是objective-c,没有swift。有人能弄清楚为什么这会一直返回 401 错误吗???
编辑:我也试过 let client =MPOFaceServiceClient(endPointAndSubscriptionKey: "MY_SERVER_AREA", key: "MY_API_KEY")
但这一次返回所有时间 404 错误,找不到资源。