Reputation: 409
I am using twilio for making a video chat app. Here is one payload of my tokens in the decoded format:
{
"jti": "SK2810640be40e8b7d0770a7aa4932e0a0-1506591793",
"grants": {
"identity": "598ee57aeb879816e323174f",
"video": {
"room": "59ccc3ff97c63d2298dc2b52"
}
},
"iat": 1506591793,
"exp": 1506595393,
"iss": "SK2810640be40e8b7d0770a7aa4932e0a0",
"sub": "ACf1c692f8447f5f7c0f9187c1bd2e5200"
}
As seen here, my token is supposed to expire a minute after it is created. The documentation states that I have to 'update the token for an uninterrupted access to twilio services'. But I can confirm that even well past that one minute, participant in my room is able to receive and send video just fine. But isnt the token expiration supposed to revoke the access to that participant in that room?
Upvotes: 2
Views: 741
Reputation: 73055
Twilio developer evangelist here.
When the access token expires, your user will not be able to start any new video calls.
Once a video is connected, the expiry of an access token will not cancel that connection. Peer to peer video calls made with Twilio Video are connections directly between the two peers, so once the connection is made Twilio is no longer a part of it and can't revoke access directly. You could write code the triggers the video to end on the client side, if you need that.
Let me know if that helps at all.
Upvotes: 3