Authentication & Security
🔹 What is a JWT token, and why is it used in viaSocket Embed?
A JWT (JSON Web Token) is a compact, URL-safe way of securely transmitting user and project information between two parties.
In viaSocket Embed, the JWT token:
Ensures secure and authenticated communication between your SaaS/AI app and third-party services
Contains user and project details for flow isolation
Is encrypted with HS256 to keep sensitive data safe during transmission.
🔹 How do I generate a JWT token in viaSocket Embed?
Follow these steps:
Obtain the org_id, user_id, project_id, and access key from the viaSocket SDK.
Create a JSON object with the required details, like this:
{
"org_id": "Tix4zpLRv9vq",
"project_id": "projQRZP6Nzm",
"user_id": "[email protected]"
}
Use the JSON data along with your access key to generate the JWT token using HS256 encryption.
Embed the JWT token in the embedToken parameter of the script tag (viasocket-embed-main-script) in your application.
🔹 What happens if I don’t pass a unique user_id
for each user?
Every user must have a unique user_id
. Without it:
Different users may share the same workflows or data
Data conflicts and security risks can occur
Personalization is lost
Assigning a unique user_id
ensures each user gets a separate, secure, and personalized workflow experience.
🔹 Where can I find the list of apps available for integration?
You can browse through the list of over 5000+ apps available for integration with viaSocket Embed by visiting the following link:
viaSocket Integrations