JavaScript

Authenticate your Users

Your users must be authenticated to be able to participate in the Conversation. You perform this authentication using the Conversation ID and the JWTs you generated in a previous step.

Declare the following variables at the top of your chat.js file and populate ALICE_JWT, BOB_JWT and CONVERSATION_ID with your own values:

You'll also need to add an event listener to the login form to fetch the user's JWT and pass it in to the run function. The run function doesn't do anything yet, but at this point you have a valid user JWT to start building your application.