0
votes

I'm returning a message from Lambda to the Lex Bot like this:

return Close(
    sessionAttributes,
    "Fulfilled",
    new LexResponse.LexMessage {
        contentType = "PlainText",
        content = "Thanks"
    }
);

Is it possible to return HTML as the content, even an iframe to external content?

contentType doesn't seem to have an option for HTML, is it possible?

Thanks

1

1 Answers

3
votes

Whatever you are putting in the content will be returned to the client, parsing of the message is the job of client you are using.

So if you are putting content = "<h1>Thanks</h1>" to a website you are using as chat client, then it will be displayed as heading. Browser will be able to format it accordingly.

Note: its contentType and content, i.e first letter is in small-case.

Hope it helps.