AccessToken identity option should be required
Issue Summary
When creating a new AccessToken object, "identity" is an optional parameter of the options object. https://www.twilio.com/docs/libraries/reference/twilio-node/3.47.0/AccessToken.html
According to the documentation here (and my testing), all access tokens require the following:
- A Twilio Account SID, which is the public identifier of the Twilio account associated with the Access Token.
- An API Key SID, which is the public identifier of the key used to sign the token.
- An Identity grant, which sets the Twilio user identifier for the client holding the token.
- The API Key Secret associated with the API Key SID is used to sign the Access Token and verify that it is associated with your Twilio account.
I believe identity should be required in the constructor, since that is a breaking change the documentation should at least be updated
Technical details:
- twilio-node version: 3.47.0
Nice catch. This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.
Lost a lot of time for this issue, was getting a generic "Error 20101: Invalid Access Token" until identity was added to access token options
Bumped up the internal backlog (ref: DI-2445).