This folder has an example html page that you can use to test your code. You will need the amazon-connect-chat-interface.js compiled code from this project and the example solution to start chat using API Gateway and Lambda backend components as defined in this GitHub repo.
NOTE: This approach requires a proxy to invoke the Amazon Connect Public StartChatContact API. Refer to the startChatContactAPI CloudFormation Template to deploy an API Gateway proxy solution.
- Follow the steps in this repo to deploy the backend pieces to start a chat.
- Follow the steps in the main README of this GitHub repo to compile the code and generate the
amazon-connect-chat-interface.js
file. - Once you have generated the
amazon-connect-chat-interface.js
, copy it into this directory. - Modify the backendEndpoints.js file to include the values used as parameters (contact id, instance id, apiGatewayEndpoint and region) and created as an output in step 1 (API Gateway endpoint URL). All the necessary variables are marked by "TODO".
- Using the command line, install http-server by running
npm install -g http-server
- Navigate to the
local-testing
folder and run the code locally by runninghttp-server
- Open
http://127.0.0.1:8080/
in your browser. - To test, enter your name and click
Start Chat
, it will trigger the API Gateway endpoint to start the chat and then establish the chat on the front end.