[Azure Cognitive Services Connector] 401 Access Denied in EmotionRecognition

Forge Component
Published on 2018-09-26 by Pedro Oliveira
13 votes
Published on 2018-09-26 by Pedro Oliveira

I get the following error when I use Azure Cognitive Services connector in my mobile app: 401 Access Denied

I am trying to recognize emotion of a person from his/her facial expressions, and this functionality doesn't work for me. I also checked the development cloud for stack trace:

    at Object.a [as getException] (https://shamli-singh.outsystemscloud.com/Awww/scripts/OutSystems.js?TgkYxm38WdiNZwCb45Sl2w:1:23727)
    at XMLHttpRequest.y.onload (https://shamli-singh.outsystemscloud.com/Awww/scripts/OutSystems.js?TgkYxm38WdiNZwCb45Sl2w:3:4406)

Please help me!


The API keys need to be set in the connector before using


Keep in mind: the emotions API is deprecated. It's been moved to the Faces API.

Shamli Singh wrote:

The API keys need to be set in the connector before using

Can you please tell me where we have to set that keys, and how to set the keys


The keys are for the Azure Cognitive Services. You can obtain them by clicking try for free in the Cognitive Services website.



Couple of thoughts on your issue:

  1. Your azure keys needs to be set as mentioned before (in ServiceCenter (Factory > eSpaces > Azure Cognitive Services Connector > Site Properties > OcpApimSubscriptionKey)
  2. You need to ensure you align the Azure key regions and Azure API regions defined in Service Center to be the same.

Also - re: Caio's point, we have heavily refactored and will soon release a new version of the plugin that supports the new APIs for emotion analysis, etc.