Create webchat channel with enabled secure webchat
Setup on Client BE code
Generate authToken with API, /token/auth and it will return authToken (one time use).
Use authToken to generate accessToken with API, /token/access and it will return accessToken.
Insert the accessToken into the SDK configuration to initiate the chat. Steps 1 and 2 will be handled by the customer's backend. For example, Website A has its own authentication system. Their customers log in to their website, and the backend needs to execute Steps 1 and 2 to obtain an access token, then initiate the Webchat session using this access token.
curl --location 'https://webchat.amitysolutions.com/token/auth' \
--header 'Content-Type: application/json' \
--data '{
"channelId": "channelId", // channelId in channel Setting
"token": "userId1", // userId that we normally put in html
"serverKey": "secretKey" // one of valid serverKey in channel Setting
}'