question

newuser-0c32778c-f84d-4567-b879-89bf6e0bb1b8 avatar image

Application ID is not getting accepted

Application ID is not getting accepted

Getting the below error

{
  "errorMessage": "com.amazon.speech.speechlet.SpeechletRequestHandlerException: Could not validate SpeechletRequest request5678 using verifier ApplicationIdSpeechletRequestVerifier, rejecting request",
  "errorType": "java.lang.RuntimeException",
  "stackTrace": [
    "com.amazon.speech.speechlet.lambda.SpeechletRequestStreamHandler.handleRequest(SpeechletRequestStreamHandler.java:85)"
  ],
  "cause": {
    "errorMessage": "Could not validate SpeechletRequest request5678 using verifier ApplicationIdSpeechletRequestVerifier, rejecting request",
    "errorType": "com.amazon.speech.speechlet.SpeechletRequestHandlerException",
    "stackTrace": [
      "com.amazon.speech.speechlet.SpeechletRequestHandler.handleSpeechletCall(SpeechletRequestHandler.java:63)",
      "com.amazon.speech.speechlet.lambda.SpeechletRequestStreamHandler.handleRequest(SpeechletRequestStreamHandler.java:81)"
    ]
  }
}

This is the syntax i'm using:
supportedApplicationIds.add("amzn1.echo-sdk-ams.app.e6c9056b-46da-4800-9c4e-69c1035adbd3");
alexa skills kit
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Brian@Amazon avatar image
Brian@Amazon answered

Hi. Without seeing your code this is a bit difficult to answer, but your syntax seems fine for that particular call.

A simple implementation of the request verifier function can be seen here, make sure the structure is similar to this:

https://github.com/amzn/alexa-skills-kit-java/blob/121336de172137039c36963553ede92af8fef137/samples/src/main/java/helloworld/HelloWorldSpeechletRequestStreamHandler.java

Also, make sure you are using the correct application ID as outlined here:

https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/handling-requests-sent-by-alexa#verifying-that-the-request-is-intended-for-your-service

The above link also provides fairly extensive documentation on how to use the verifier.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

newuser-0c32778c-f84d-4567-b879-89bf6e0bb1b8 avatar image
newuser-0c32778c-f84d-4567-b879-89bf6e0bb1b8 answered

Yeah got this fixed.

The solution is ,application id syntax which we specify in HelloWorldSpeechletRequestStreamHandler,jave file should match with AWS lambda setup.

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

In AWS lambda for your function you should configure the test event in Actions tab.

you can specify your application id there

0 Likes 0 ·