Gjermund Bjaanes
Gjermund Bjaanes

Reputation: 255

Bad Argument, Invalid Subscription Key when trying to add key from Azure

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

Upvotes: 2

Views: 1780

Answers (2)

Paolo Cappello
Paolo Cappello

Reputation: 121

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.

Upvotes: 2

Gjermund Bjaanes
Gjermund Bjaanes

Reputation: 255

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.

Upvotes: 5

Related Questions