After creating the Face API resource, you can find it in the following section:
Please be certain to make a Face API, or Cognitive Services resource. I'm mentioning this because your screenshot mentions an API Management Service.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
<script type="text/javascript">
$(function() {
var params = {
// Request parameters {faceListId}
};
$.ajax({
url: "https://westus.cognitiveservices.azure.com/face/v1.0/facelists/MyName?" + $.param(params),
beforeSend: function(xhrObj){
// Request headers
xhrObj.setRequestHeader("Content-Type","application/json");
xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","0cad3...c8b1");
},
type: "PUT",
data: "https://<<my_domain>>.com.br/face/midias/minha_foto.jpg",
})
.done(function(data) {
alert("success");
})
.fail(function() {
alert("error");
});
});
</script>
I don't know if I'm getting the correct key, as there are two more keys, called KEY1 and KEY2. Anyway, how to get the correct key to work this example for creating the list and adding the faces in it?
After creating the Face API resource, you can find it in the following section:
Please be certain to make a Face API, or Cognitive Services resource. I'm mentioning this because your screenshot mentions an API Management Service.