microsoft / Cognitive-LUIS-Windows

Windows (.Net) SDK for the Microsoft Language Understanding Intelligent Service API, part of Congitive Services
www.microsoft.com/cognitive-services/en-us/language-understanding-intelligent-service-luis
Other
134 stars 78 forks source link

SDK usage with Azure standard pricing tier #13

Closed SKApretto71 closed 8 years ago

SKApretto71 commented 8 years ago

I'm using the SDK since some time now with no issue. I created a few Applications on luis.ai and I'm accessing using AppId and AppKey as per luis.ai site.

I'm now moving into a S0 paid subscription for LUIS on Azure portal, hence I replaced former "AppKey" with the new "Key" value found on Azure Portal. Doing so, I'm getting a request to authenticate myself (if exercising from a browser) or a code 401 {"Response status code does not indicate success: 401 (This application cannot be accessed with the current subscription)."} if using the SDK.

How can I leverage the Azure Key and Subscription details to use the SDK? I need as it allows higher thrughput (10 requests/second) and unlimited usage.

In summary:

https://api.projectoxford.ai/luis/v1/application?id={AppId}&subscription-key={LUIS Key from portal}&q=aaa -> works just fine

https://api.projectoxford.ai/luis/v1/application?id={AppId}&subscription-key={LUIS Key from Azure}&q=aaa -> raise a code 401

I'm missing something? Appears I need to authenticate somehow, but I'm not getting how I can do so through the SDK.

SKApretto71 commented 8 years ago

Cancel this comment. The solution belongs in old documentation found on luis.ai . The page refers to "Once you have created your key, you can add it to your account via the application settings dialog, found in any application." while the Azure Key need to be added in the User Profile dialog page.

Found it, now works as expected