I have to assign the subscription key to luis app which i created on azure.
I am using LUIS Api V2.0 to Assign Subscription Key To App.
I have used Update application version external key endpoint for it. https://westus.api.cognitive.microsoft.com/luis/api/v2.0/apps/{appId}/versions/{versionId}/externalKeys
(API sample url) https://westus.dev.cognitive.microsoft.com/docs/services/5890b47c39e2bb17b84a55ff/operations/5890b47c39e2bb052c5b9c43/console
I have created the new LUIS subscription key from azure. However, I am not able to assign the subscription key to my app.
Below is my body request
{
"type": "LanguageUnderstanding",
"value": "ee29*******************717"
}
below is the response which i got.
{
"error": {
"code": "BadArgument",
"message": "Invalid external key type"
}
}
I have modified the type variable in my request body like, Cognitive Service
- CognitiveService
- Cognitive Services
- CognitiveServices Language
- Understanding Intelligent Service
- LanguageUnderstandingIntelligentService
- LanguageUnderstanding
- Language Understanding
But, none of them seems working for me. I am getting the same error response every time.
Further, I have googled around and found that this is possible with LUIS Api V1.0 . So, I tried with Assign Subscription Key To App
( API sample url ) https://westus.dev.cognitive.microsoft.com/docs/services/56d95961e597ed0f04b76e58/operations/580c6eea39e2bb161819981d/console
following is my endpoint https://westus.api.cognitive.microsoft.com/luis/v1.0/prog/apps/5b2556b8-f97d-4772-9bf0-4f576ec9fc59/subscription
Request body
08ebb******************e7142d3
Request Header
{ "Content-Type" : "text/plain", "Ocp-Apim-Subscription-Key":"as23d*******123d"}
Error Response
{
"Message": "The request entity's media type 'text/plain' is not supported for this resource."
}
I even tried with content-type:application/json. but , it too was not working.
So. I am not able to assign the subscription key by using either V1.0 or V2.0 LUIS api
Please guide me how assign newly created subscription key to luis with api.
I have also tried the following V2.0 endpoint requests, but they are deprecated now. Assign subscription key to version , Add external api key, Add subscription key