I have created my lex bot and published it. I am now trying to test it out from a rest client.
The idea is once working from rest client ,i can integrate this with my custom UI using rest calls.
I am using this request body from posttext as per this link http://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html
When i am using this from rest client i am getting Missing Authentication Token.
The end point url used is https://runtime.lex.us-east-1.amazonaws.com
Should i add something in the authorization header like AWS Signature or something else to make this work.
You need to include an AWS Signature in the Authorization tab, containing the details of an IAM user that has access to run your Lex bot.
Steps: 1. In AWS go to IAM -> Users -> Add User
Hit Create Group.
Then hit "Create User" - and your IAM user is ready. You'll see an Access key ID and a Secret Access Key.
In Postman, in Authorization, select AWS Signature and enter in the Access key ID and the Secret Access Key, along with an AWS Region of "us-east-1" and a Service Name of "lex":
Hit Send and you should get a response like this:
{
"dialogState": "Fulfilled",
"intentName": "yourIntentName",
"message": "A response for that intent",
"responseCard": null,
"sessionAttributes": {},
"slotToElicit": null,
"slots": {}
}
Update
Note also - the POST url would be in format:
https://runtime.lex.us-east-1.amazonaws.com/bot/MyBotName/alias/myMyAlias/user/aUniqueUserID/text and it should be a POST
Also make sure the header Content-Type is application/json, as is the body.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With