4

ASKING THIS HERE AT THE EXPLICIT REQUEST OF THE MICROSOFT AZURE SUPPORT TEAM.

I've been attempting to call the MS Luis.ai programmatic API (bit.ly/2iev01n) and have been receiving a 401 unauthorized response to every request. Here's a simple GET example: https://api.projectoxford.ai/luis/v1.0/prog/apps/{appId}/entities?subscription-key={subscription_key}.

I am providing my appId from the Luis.ai GUI (as specified by the API docs), here:
Luis.ai App Settings App Id

I am providing my subscription key from Azure (as specified by the API docs), here:
Azure Console

The app ID and subscription key, sourced from above, are the exact same as what I'm using to hit the query API successfully (see note at bottom). My account is pay-as-you-go (not free).

Am I doing something wrong here? Is this API deprecated, moved, down, or out-of-sync with the docs?

NOTE: I can manipulate my model through the online GUI but that approach will be far too manual for our business needs where our model will need to be programmatically updated as new business entities come into existence.

NOTE: The programmatic API is different from the query API which has this request URL, which is working fine for me:
https://api.projectoxford.ai/luis/v2.0/apps/{appId}?subscription-key={subscription_key}&verbose=true&q={utterance}

NOTE: There doesn't seem to be a Luis.ai programmatic API for v2.0--which is why the URLs from the query and programmatic APIs have different versions.

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
Pete Terlep
  • 191
  • 1
  • 10
  • 401 can mean that the App ID you are using isn't associated with the sub key you use, or vice versa. – Mokhtar Ashour Jan 13 '17 at 16:46
  • @MokhtarAshour: That is true. However, I mention in my issue that I am using the exact same appId-key combo to successfully use the query API. If the programmatic API requires a different tuple, that information is absent from the API docs. – Pete Terlep Jan 13 '17 at 17:54

2 Answers2

7

Answering my own question here:

I have found my LUIS.ai programmatic API key. It is found by: LUIS.ai dashboard -> username (upper-right) -> settings in dropdown -> Subscription Keys tab -> Programmatic API Key

It was not immediately obvious since it's found nowhere else: not alongside any of the other key listings in cognitive services or the LUIS.

Pete Terlep
  • 191
  • 1
  • 10
  • Thanks! This had me stumped for some time as well. Not obvious at all! Especially since the screenshots here https://blogs.msdn.microsoft.com/kwill/2017/05/17/http-401-access-denied-when-calling-azure-cognitive-services-apis/ seem to indicate you should use the keys from the Azure Portal. – otajor Oct 11 '17 at 12:55
0

the programatic key for Luis is here ,

https://www.luis.ai/Home/UserSettings

enter image description here

Maroine Abdellah
  • 576
  • 1
  • 5
  • 21