1

Our Twilio application, which handles outbound calls from an SSL secured website, starts throwing errors during calls. The errors occur during phone calls, and sometimes just when the browser sits idle. We have tried setting the expiration to zero, a few seconds, a few minutes, and up to 24 hours, but the errors still occur.

Errors like this are logged in the Chrome debug console:

31204 Invalid JWT token.
31205 JWT token expired.

Once the errors begin, they repeat hundreds of times while the call is still live.

What causes Twilio JWT token expired errors during working WebRTC sessions?

Alain O'Dea
  • 21,033
  • 1
  • 58
  • 84
  • What do you mean you can't paste it in? Can you actually not paste at all, or is it just not formatted how you expected? If you really can't paste, try pasting to a text editor first, like sublime or notepad++ and then copy/pasting from there. If it's just formatted incorrectly, you have to indent code 4 spaces on StackOverflow. – Brendan Abel Dec 02 '15 at 19:10
  • Clean up formatting. Remove platform complaints. Provide specific question about issue. – Alain O'Dea Dec 02 '15 at 19:48

1 Answers1

0

Megan from Twilio here.

Tokens expiring shouldn't be a problem for active calls. You should still be able to continue the call, but you won't be able to initiate a new call until you generate a new token. You can generate a new token behind the scenes and use an Ajax call to retrieve it. I suspect this would take care of the repeat errors.

Otherwise, you might look into the time stamp on an expired token as suggested in this FAQ.

Hope this helps!

Megan Speir
  • 3,745
  • 1
  • 15
  • 25