Twilio keeps telling me that my capability token is expired. Why?
Twilio Client relies on capability tokens to sign communications from devices to Twilio. If not specified, by default all tokens generated with the Twilio helper libraries expire after one hour of creation.Though the lifetime of a token is configurable up to 24 hours, it is recommended that you make it as short as possible.
If Twilio is complaining about an expired token, check the time stamp to make sure whether the token has reached its lifetime. If a token appears that it should still be active, make sure your server time clock is set up correctly.
Capability token time-to-live is calculated using seconds since Unix epoch time, so if you’re having consistent issues with short TTL capability tokens, having an incorrect system time clock would result in an active token being mistakenly reported as expired.
Still can’t figure out why? Send us a copy of the token string and we’ll look into it for you.