我已经尝试过使用与两个不同电子邮件地址关联的免费试用 key 和“即用即付”计费方式。他们都返回了相同的消息:
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.
我正在使用这个FACE API getting started tutorial
private readonly IFaceServiceClient faceServiceClient = new FaceServiceClient("39a8b...0fd1");
var faces = await faceServiceClient.DetectAsync(imageFileStream);
最佳答案
I have an endpoint defined in the Portal "eastus2.api.cognitive.microsoft.com/face/v1.0"; but I don't know how to associated this endpoint with my service calls. What am I missing, please?
如果您获得了端点,则可以将其放入 FaceServiceClient 的构造函数中。下面的代码供您引用。
private readonly IFaceServiceClient faceServiceClient =
new FaceServiceClient("your_key", "https://eastus2.api.cognitive.microsoft.com/face/v1.0");
关于c# - 人脸API "Access denied due to invalid subscription key...",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43918434/