1

I am building a twilio function but I am getting an error using a function that's in the documentation (https://www.twilio.com/docs/taskrouter/api/workspace-statistics?code-sample=code-retrieve-workspace-real-time-statistics&code-language=Node.js&code-sdk-version=3.x) I know the npm version of Twilio is 3.6.3 from (functions/configure).

client.taskrouter.workspaces(workspaceSid)
        .realTimeStatistics()
        .fetch()
        .then(workspace_real_time_statistics => { agentsActive = workspace_real_time_statistics.total_workers});

when running the function I get the following error:

client.taskrouter.workspaces(...).realTimeStatistics is not a function

danny gonzalez
  • 210
  • 2
  • 10

1 Answers1

0

Below is the Node Helper Library Details.

It looks like it was possibly added in 3.7.0?

twilio-node changelog

Alan
  • 10,465
  • 2
  • 8
  • 9
  • can you please be more descriptive here? Im not sure this answers the questions directly. – Judy007 Jul 29 '19 at 19:31
  • If you are using Twilio Functions, once logged into the Twilio Console, visit this URL, https://www.twilio.com/console/functions/configure, and change the twilio client NPM module to a more recent version, say 3.33.2 and make sure to save. – Alan Jul 30 '19 at 22:10