Gathering detailed insights and metrics for syg-twilio-taskrouter
Gathering detailed insights and metrics for syg-twilio-taskrouter
Gathering detailed insights and metrics for syg-twilio-taskrouter
Gathering detailed insights and metrics for syg-twilio-taskrouter
JS SDK v2 for Twilio's TaskRouter skills based routing system.
npm install syg-twilio-taskrouter
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (97.23%)
TypeScript (2.24%)
Shell (0.5%)
Makefile (0.02%)
Dockerfile (0.01%)
CSS (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
27 Stars
736 Commits
37 Forks
19 Watchers
42 Branches
63 Contributors
Updated on May 15, 2025
Latest Version
0.11.2
Package Id
syg-twilio-taskrouter@0.11.2
Unpacked Size
4.51 MB
Size
964.17 kB
File Count
57
NPM Version
6.13.4
Node Version
8.17.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
34
TaskRouter is Twilio's skills based routing system. With this library, you can manage your Workers in the browser or view the state of your Workspace.
NOTE: This SDK is in a Developer Preview Release. This version of TaskRouter is intended for Twilio Flex. If you are using it outside of Twilio Flex, you may encounter bugs and instability, and the underlying APIs available in this release may change in subsequent releases.
We want your feedback! Email Tyler Cole at tcole@twilio.com with suggested improvements, feature requests and general feedback. If you need technical support, contact help@twilio.com.
npm install twilio-taskrouter
The following is a simple example showing a Worker waiting for Reservations. For more information, refer to the API Docs.
1const TaskRouter = require('twilio-taskrouter'); 2const Twilio = require('twilio'); 3const AccessToken = Twilio.jwt.AccessToken; 4const TaskRouterGrant = AccessToken.TaskRouterGrant; 5 6const accountSid = ''; 7const signingKeySid = ''; 8const signingKeySecret = ''; 9const workspaceSid = ''; 10const workerSid = ''; 11 12const token = createAccessToken(accountSid, signingKeySid, signingKeySecret, workspaceSid, workerSid); 13const alice = new TaskRouter.Worker(token); 14 15alice.on('ready', readyAlice => { 16 console.log(`Worker ${readyAlice.sid} is now ready for work`); 17}); 18 19alice.on('reservationCreated', reservation => { 20 console.log(`Reservation ${reservation.sid} has been created for ${alice.sid}`); 21 console.log(`Task attributes are: ${reservation.task.attributes}`); 22 23 reservation.on('accepted', acceptedReservation => { 24 console.log(`Reservation ${acceptedReservation.sid} was accepted.`); 25 }); 26 27 reservation.accept().then(acceptedReservation => { 28 console.log(`Reservation status is ${acceptedReservation.status}`); 29 }).catch((err) => { 30 console.log(`Error: ${err}`); 31 }); 32}); 33 34function createAccessToken(accountSid, signingKeySid, signingKeySecret, workspaceSid, workerSid) { 35 const taskRouterGrant = new TaskRouterGrant({ 36 workerSid: workerSid, 37 workspaceSid: workspaceSid, 38 role: 'worker' 39 }); 40 41 const accessToken = new AccessToken(accountSid, signingKeySid, signingKeySecret); 42 accessToken.addGrant(taskRouterGrant); 43 accessToken.identity = 'alice'; 44 45 return accessToken.toJwt(); 46} 47
See CHANGELOG.md.
See LICENSE.md.
Fork and clone the repository. Then, install dependencies with
yarn install
Then run the build
script:
yarn build
The builds and docs will be placed in the dist/
directory.
Before commits, be sure to validate by running:
make lint
Bug fixes welcome! If you're not familiar with the GitHub pull request/contribution process, this is a nice tutorial.
No vulnerabilities found.
Reason
12 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no SAST tool detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
30 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More