I have a simple questionnaire service where the user has to answer for different questions.
There is a common code in my Alexa skill which is saying something before preparing the next question to the user. (custom postPhraze or `please wait` token).
The user can communicate with alexa skill by voice (he/she can say `answer a, answer b`) or select the answer item on the screen. For last case the method Display.onElementSelected is implemented.
If the user clicks to the screen, the code is Display.onElementSelected triggered, main logic works fine, but the progressive response is failed always!
I've already checked the parameters --> they are populated, there are no missed parameters!
Server returned HTTP response code: 403 for URL: https://api.amazonalexa.com/v1/directives at com.amazon.speech.speechlet.services.DirectiveServiceClient.dispatch(DirectiveServiceClient.java:81) at com.amazon.speech.speechlet.services.DirectiveServiceClient.enqueue(DirectiveServiceClient.java:59)
The official API says following about the possible reason
The authentication token is invalid or doesn't have access to the resource. This is also returned if the requestId represents a request that is no longer applicable, such as when the progressive response is received after skill's full response.
String requestId = envelope.getRequest().getRequestId(); where envelope = SpeechletRequestEnvelope<ElementSelectedRequest>.
Could anybody help me? Please advice, why the progressive response (the same code) doesn't work ONLY when the user clicks to the selected element on the screen and works fine if user uses the voice for giving the answer. The code is really the same! But the trigger points are different.
Thank you in advance!