"Operation returned an invalid status code 'Forbidden'", how can I solved it?

Valeria Margarita Espinoza Sanchez 20 Reputation points
2024-04-15T17:05:29.7866667+00:00

Hello, I am learning how to use the Face API to be able to do a facial recognition project. I started practicing with the example provided by Microsoft in the following link https://learn.microsoft.com/es-es/azure/ai-services/computer-vision/quickstarts-sdk/identity-client-library?tabs=windows %2Cvisual-studio&pivots=programming-language-csharp, when I run the console I get the following error:

User's image

This error had already appeared to me before and when researching about it, on various pages they mentioned that this error is due to the fact that you need to request permission from Microsoft so that they can manage your access to the API. I already applied for it and it was accepted, so I tried the program again but the error keeps appearing, how can I fix it? The code is exactly the same except for these two variables:

User's image

The image above is the original code, but when I copied it into the program an error appeared in the constant variables and I had to place my key and endpoint visibly in the code.

Azure Face
Azure Face
An Azure service that provides artificial intelligence algorithms that detect, recognize, and analyze human faces in images.
153 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,404 questions
{count} votes