To avoid exposing app IDs and developer keys, generate Vidyo.io tokens on the server side of the application and then pass them on to the client. Vidyo.io provides detailed information about generating tokens in Python, Java, JavaScript, and C# on the Developers Documentation page.

The following example generates a token in Python: 

python3 generateToken.py --key=INSERT_YOUR_KEY --appID=INSERT_YOUR_APP_ID --userName=user1 --expiresInSecs=10000

A few things to keep in mind:

        • The userName in the generator must be unique for each participant in the video call.
        • The userName field cannot contain any spaces or special characters.
        • The token must be unique for each participant in the call; this is always the case for unique UserNames.

What happens if the token expires in the middle of a video chat?

Tokens are used to gain entry into a resource (room) so as long as the token is not expired (and otherwise valid), the participant can connect. Therefore, once a participant is connected, then the token may expire without any consequences. The participant will remain connected.

Was this article helpful?
1 out of 1 found this helpful

0 Comments

Follow
Please sign in to leave a comment.