You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constmainAccountCalls=client.api.v2010.account.calls.list; // SID not specified, so defaults to accountSid
126
-
constsubaccountCalls=client.api.v2010.account(subaccountSid).calls.list; // SID specified as subaccountSid
127
-
```
128
-
129
95
### Lazy Loading
130
96
131
97
`twilio-node` supports lazy loading required modules for faster loading time. Lazy loading is enabled by default. To disable lazy loading, simply instantiate the Twilio client with the `lazyLoading` flag set to `false`:
132
98
133
-
**CommonJS:**
134
-
```javascript
135
-
// Your Account SID and Auth Token from console.twilio.com
// Your Account SID and Auth Token from console.twilio.com
147
-
importtwiliofrom'twilio';
148
-
149
-
constaccountSid=process.env.TWILIO_ACCOUNT_SID;
150
-
constauthToken=process.env.TWILIO_AUTH_TOKEN;
151
-
152
-
constclient=twilio(accountSid, authToken, {
153
-
lazyLoading:false,
154
-
});
155
-
```
156
-
157
99
### Enable Auto-Retry with Exponential Backoff
158
100
159
101
`twilio-node` supports automatic retry with exponential backoff when API requests receive an [Error 429 response](https://support.twilio.com/hc/en-us/articles/360044308153-Twilio-API-response-Error-429-Too-Many-Requests-). This retry with exponential backoff feature is disabled by default. To enable this feature, instantiate the Twilio client with the `autoRetry` flag set to `true`.
0 commit comments