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
-
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– Maria Ines Parnisari2017年05月16日 17:31:59 +00:00Commented May 16, 2017 at 17:31
-
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– Martin Beeby2017年05月16日 19:45:41 +00:00Commented May 16, 2017 at 19:45
-
2I 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– Martin Beeby2017年05月16日 19:53:33 +00:00Commented May 16, 2017 at 19:53
-
1It 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– Gjermund Bjaanes2017年05月18日 11:38:04 +00:00Commented May 18, 2017 at 11:38
-
3Adding 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.– Steven G.2017年05月30日 00:27:51 +00:00Commented May 30, 2017 at 0:27
2 Answers 2
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.
Comments
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.