question

kamsvag avatar image
kamsvag asked ·

Amazon ASK skill Test doesn't recognize my response

Ok, so I'm building this 'Hello World' kind of skill just to get started, the long term goal is to build a range of skills to make it work better here in Sweden.

So when I send a https post using 'Im only resting' or 'Hurl.it' I get the following response;

{
  "version": "1.0",
  "response": {
    "outputSpeech": {
      "type": "Plaintext",
      "text": "I am batman"
    },
    "shouldEndSession": false
  }
}

However, when I use the Amazon ASK Test tool I get this disapointing response;

The remote endpoint could not be called, or the response it returned was invalid.

I'm using https://fred.sensetecnic.com/ as Endpoint where I has a simple Node-Red flow as seen below;

[
    {
        "id": "fccf058f.613d88",
        "type": "http in",
        "z": "5230c72.fadcf38",
        "name": "Echo HTTP Request",
        "url": "/public/datur",
        "method": "post",
        "swaggerDoc": "",
        "x": 170,
        "y": 100,
        "wires": [
            [
                "901f3e5f.9fc69"
            ]
        ]
    },
    {
        "id": "901f3e5f.9fc69",
        "type": "template",
        "z": "5230c72.fadcf38",
        "name": "Say Hello",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "plain",
        "template": "I am batman",
        "x": 360,
        "y": 100,
        "wires": [
            [
                "3421703b.f441e"
            ]
        ]
    },
    {
        "id": "3421703b.f441e",
        "type": "template",
        "z": "5230c72.fadcf38",
        "name": "Format Response",
        "field": "payload",
        "fieldType": "msg",
        "format": "javascript",
        "syntax": "mustache",
        "template": "{\n    \"version\": \"1.0\",\n    \"response\": {\n    \"outputSpeech\": {\n      \"type\": \"Plaintext\",\n      \"text\": \"{
                {payload}}\"\n            },\n        \"shouldEndSession\": false\n    }\n}",
        "x": 550,
        "y": 100,
        "wires": [
            [
                "82ea55b7.881888"
            ]
        ]
    },
    {
        "id": "82ea55b7.881888",
        "type": "json",
        "z": "5230c72.fadcf38",
        "name": "JSON",
        "x": 750,
        "y": 100,
        "wires": [
            [
                "8d4e3598.93b3d8",
                "1bca074b.f41aa9"
            ]
        ]
    },
    {
        "id": "8d4e3598.93b3d8",
        "type": "http response",
        "z": "5230c72.fadcf38",
        "name": "",
        "x": 910,
        "y": 100,
        "wires": []
    }
]

It's as basic as it gets. You can see the debug from the JASON-format as this response was provoced by Amazon ASK Testing tool. To my knowledge it looks just as it should.

I've configured it as a '... subdomain of a domain ...' in the SSL Certificate section and according to www.sslshopper.com the certificate is correct.

What am I doing wrong?

alexaresponsessl
flow.jpg (147.3 KiB)
10 |2000 characters needed characters left characters exceeded

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

kamsvag avatar image
kamsvag answered ·

Ok, so the problem was in my Response Format. I wrote "Plaintext" instead of "PlainText". Simple as that. ;)

10 |2000 characters needed characters left characters exceeded

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

dannyuff avatar image
dannyuff answered ·

There are multiple answers to the "the remote endpoint" problem (believe me, I had the same error). Just do a search for this error and read what comes up. It may point you in the right direction - as it did with me.

10 |2000 characters needed characters left characters exceeded

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