twilio-node icon indicating copy to clipboard operation
twilio-node copied to clipboard

AccessToken identity option should be required

Open YassienW opened this issue 5 years ago • 2 comments

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

YassienW avatar Jul 08 '20 16:07 YassienW

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.

eshanholtz avatar Jul 10 '20 00:07 eshanholtz

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

rangelfinal avatar Nov 18 '21 22:11 rangelfinal

Bumped up the internal backlog (ref: DI-2445).

childish-sambino avatar Nov 29 '22 21:11 childish-sambino