2
votes

I am trying to set up my LUIS app in luis.ai (because it seems like I can't set it up in Azure directly?). Anyway, I have created a Language Understanding Intelligent Service (LUIS) (preview) resource, but when I enter one of the keys from that resource into "My Keys" in luis.ai, I get this error: "Bad Argument, Invalid Subscription Key"

Also, I just tried to publish an app with the bootstrap key and got the following errors:

{ "statusCode": 401, "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." } enter image description here

2
I'm pretty sure your key does not correspond to the endpoint region you're trying to hit. Anyways, can't you use portal.azure.com/#create/Microsoft.CognitiveServicesLUIS? - Maria Ines Parnisari
I have exact same issue. I have tried subscriptions in West Europe and West US. I have used LUIS many times before so wondering if there is so issue. - Martin Beeby
I created a new one in the WestUS, waited 10 mints and it started working. Not sure why the others failed. I have added an issue to the User Voice. - Martin Beeby
It also worked to create a new resource in WestUS and wait for 10 minutes before entering it into luis.ai. There it should probably work for the SDK as well. I would still like to know how to force the SDK to another endpoint. - Gjermund Bjaanes
Adding clarification notes for others encountering this: The West EU keys are bound to EU.LUIS.ai, attempting to use them in the LUIS.ai portal will indeed return the invalid key error. If you are using a West Europe subscription key for LUIS, you must use the European LUIS portal. - Steven G.

2 Answers

6
votes

As provided in comments, the solution is to use a correct end-point. This is not clear anywhere, but for the luis.ai portal, I have to use WestUS endpoint.

If I change to useing eu.luis.ai, I have to use the WestEU end-point.

2
votes

To use european LUIS endpoint within Bot Builder C# SDK, just modify Luis Model parameters as follows:

[LuisModel("YOUR-LUIS-APP-ID", "YOUR-LUIS-EUROPEAN-KEY", domain: "westeurope.api.cognitive.microsoft.com")]

Note that you'll need to export your LUIS app over EU.LUIS in order to access the correct endpoint.

Hope it helps.