103
Views
6
Comments
Solved
[Azure Cognitive Services Connector] 401 Access Denied in EmotionRecognition
Question

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:

EmotionRecognition
 Error
    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!

UserImage.jpg
Shamli Singh
Solution

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

UserImage.jpg
Ravi Kumar Tasubilli

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


2019-10-27 01-32-56
Caio Santana Magalhães
 
MVP

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

2011-06-15 10-50-19
Miguel Ventura
Staff

@Koushik


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


Cheers,

Miguel

2018-05-24 15-52-11
Andy Pemberton

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.

2023-12-14 14-46-57
Martin Hagen Myrestrand

Hi Andy,

I'm currently experiencing somewhat the same issue. I get the following error when attempting to use the TranslatorTextAPI: 

"[Azure Cognitive Services Connector] 401000: The request is not authorized because credentials are missing or invalid. "


I have described my issue in more detail here: https://www.outsystems.com/forums/discussion/89169/azure-cognitive-services-connector-401000-the-request-is-not-authorized-becaus/

You wrote in your post: "You need to ensure you align the Azure key regions and Azure API regions defined in Service Center to be the same." 


In case this is my issue, where and how do I ensure that the regions are aligned? 


Best

Martin

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.