-
Notifications
You must be signed in to change notification settings - Fork 452
Twilio Java SDK 7.x not Object Oriented, using global state? #270
Copy link
Copy link
Closed
Labels
code-generationissue deals with generated codeissue deals with generated code
Description
Version: 7.0.rc-10
API Subdomain (api/taskrouter/ip_messaging): api
Code Snippet
Twilio.init(accountSid, authToken);Feature Request
This seems to be counter to Java best practices including the Spring programming model.
It seems to be using a global state. Which creates a number of issues. One I can think of is a long-running multitenant webapp. It may host several Twilio accounts, one (or more?) for each tenant. A tenant can change their account SID and/or auth token at any time, or remove their Twilio configuration.
On this case only, I prefer the old way, where a TwilioRestClient is using a defined accountSid/authToken and has a clearly manageable lifecycle.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
code-generationissue deals with generated codeissue deals with generated code