This document will help you to understand how to create the JWT token for integrating the viasocket.
To create JWT token you need to get org_id, user_id, project_id and access key.
We will be using the HS256 to encrypt the JWT token.
While setting up the SDK from viasocket, we will provide you the project_id, org_id and access key.
create an json using the required details as shown below.
{
"org_id": "Tix4zpLRv9vq",
"project_id": "projQRZP6Nzm",
"user_id": "idrisbohasdfasdf@gmail.com"
}
and create the JWT token using the json and provided access key.
After generating the JWT token, include it as a parameter within the script tag with the ID 'viasocket-embed-main-script', specifically in the embedToken parameter. This will facilitate seamless integration.
Note: Flows of a embed project will be different for all the users, so make sure you pass unique user_id to make sure every users have their own flows.