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

假如想象 提交于 2019-12-08 01:57:26

问题


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." }


回答1:


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:


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.



来源:https://stackoverflow.com/questions/43997055/bad-argument-invalid-subscription-key-when-trying-to-add-key-from-azure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!