Skip to content

TwilioTokenOptions

Defined in: lib/token/twilio-token.interface.ts:27

JWT settings shared by every token, independent of which grants it carries.

https://www.twilio.com/docs/iam/access-tokens#step-3-generate-token

Property Type Description Defined in
identity string Identity the token represents, normally a username in your system. Voice tokens accept only alphanumeric characters and underscores; this is enforced when minting a Voice token. lib/token/twilio-token.interface.ts:34
nbf? number Epoch seconds before which the token is not accepted. lib/token/twilio-token.interface.ts:44
region? string Twilio Region for the token. Currently honoured for Voice tokens only. See https://www.twilio.com/docs/global-infrastructure/understanding-twilio-regions lib/token/twilio-token.interface.ts:51
ttl? number Lifetime in seconds. Defaults to the SDK’s 3600. Twilio caps tokens at 24 hours (86400), and recommends the shortest lifetime your application can tolerate. lib/token/twilio-token.interface.ts:41