I have been working on an Alexa skill and till date it worked fine but today i have encountered a strange issue. The similar issue can be seen in other skills as well. The issue is that i am getting multiple authorities in resolutionsPerAuthority of my skill's request JSON. These authorities have different status code for match of slot values. Hence my code is finding difficulties because resolutionsPerAuthority is supposed to have only one object.
I am using the code provided in official docs of amazon to get slot values and it it failing due to this very scenario. Anyone else facing the similar issue ? Any solutions?
Here is my request JSON:
{
"version": "1.0",
"session": {
"new": false,
"sessionId": "amzn1.echo-api.session.f4bf3a11-f882-4732-9275-6e494e0bca4d",
"application": {
"applicationId": "app id"
},
"attributes": {
"launchCount": 0,
"jokeCount": 0,
"indexes": [
34
],
"lastSpeechOutput": {
"outputSpeech": "response",
"reprompt": "reprompt"
},
"history": [
{
"IntentRequest": "LaunchRequest"
}
],
"currentJokeIndex": 34,
"lastUseTimestamp": 0
},
"user": {
"userId": "amzn1.ask.account.ncsdkncsdlcnskY"
}
},
"context": {
"Display": {
"token": "string"
},
"System": {
"application": {
"applicationId": "id"
},
"user": {
"userId": ""
},
"device": {
"deviceId": "",
"supportedInterfaces": {
"Display": {
"templateVersion": "1.0",
"markupVersion": "1.0"
}
}
},
"apiEndpoint": "https://api.eu.amazonalexa.com",
"apiAccessToken": ""
}
},
"request": {
"type": "IntentRequest",
"requestId": "amzn1.echo-api.request.824ef2fe-5a6b-45c8-96d2-a5aa0063e9b5",
"timestamp": "2018-07-26T13:47:56Z",
"locale": "en-IN",
"intent": {
"name": "TellJokeIntent",
"confirmationStatus": "NONE",
"slots": {
"joke": {
"name": "joke",
"value": "joke",
"resolutions": {
"resolutionsPerAuthority": [
{
"authority": "amzn1.er-authority.echo-sdk.amzn1.ask.skill.a4bb9873-04fa-486f-8e1e-e30cb3c3d669.joke",
"status": {
"code": "ER_SUCCESS_MATCH"
},
"values": [
{
"value": {
"name": "joke",
"id": "e2ff3cfd4b43876adaa5767ce93bf7d3"
}
}
]
},
{
"authority": "amzn1.er-authority.dynamic.amzn1.ask.skill.a4bb9873-04fa-486f-8e1e-e30cb3c3d669.joke",
"status": {
"code": "ER_SUCCESS_NO_MATCH"
}
}
]
},
"confirmationStatus": "NONE"
}
}
}
}
}