Twilio Node.js Outgoing Caller IDs API

ejones

When I try to use Twilio's outgoing caller ids API with the Node.js library function to verify a phone number to a subaccount I get a "resource was not found" error. I am calling the function like so:

client.outgoingCallerIds('SubAccountSid').post({ PhoneNumber: "###" }, function(){ });

It appears the Node.js library makes the call with the format '/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{SubAccountSid}'.

I can use the format '/2010-04-01/Accounts/{SubAccountSid}/OutgoingCallerIds/' to verify the number and everything works fine. Is this a bug in the Node.js library or is this not the correct way to use outgoingCallerIds?

philnash

Twilio developer evangelist here.

The Node.js libary, like most of the official libraries, assumes that you are using the main account when making API calls. The following code is effectively the same:

client = require("twilio")(ACCOUNT_SID, AUTH_TOKEN);
client.outGoingCallerIds.list()

and

client.accounts(ACCOUNT_SID).outGoingCallerIds.list()

To use a subaccount, you should set up your client as normal then pick the subaccount using the accounts resource and make API calls based on the account object.

client = require("twilio")(ACCOUNT_SID, AUTH_TOKEN);
subAccount = client.accounts(SUB_ACCOUNT_SID);
subAccount.outgoingCallerIds().post({ PhoneNumber: "###" }, function(){ });

Let me know if that helps.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Add A New Outgoing Caller ID using REST API Twilio

From Dev

twilio say something to caller (node.js)

From Dev

twilio say something to caller (node.js)

From Dev

How to create confirmed outgoing caller ID from Toll-free twilio numbers?

From Dev

Node.js Twilio make calls using REST API

From Dev

filter outgoing requests in node.js for logging

From Dev

Using the Twilio Client API can you answer a specific caller in the queue

From Dev

New Caller Insert to Database with Codeigniter using the Twilio API

From Dev

Twilio outgoing call id

From Dev

Separate Twilio caller ID

From Dev

Twilio Screen Caller with Voicemail

From Dev

verifiy twilio caller ID

From Dev

Twilio Outgoing call via batchfile

From Dev

Kurento recording caller and callee stream in node.js

From Dev

How to get caller ip in node.js + express?

From Dev

Twilio - Outgoing call - play DTMF tones

From Dev

Return info after Twilio client outgoing call

From Dev

Twilio multiple agents one number for outgoing calls

From Dev

Node.js sequelize embed hasMany IDs

From Dev

Node.js webcrawler can't hanlde more than 50 simultaneous outgoing connections

From Dev

Twilio Inbound SMS issue using Node.js

From Dev

deleting a call recording from twilio in node.js

From Dev

Twilio MMS with Node.js - Sending multiple media files

From Dev

node js twilio send sms doesn't work

From Dev

Twilio Call Logs (Node.js helper Library)

From Dev

Getting error '_http_outgoing.js:335' while sending API response from backend to frontend

From Dev

Twilio Ability to use same number for two simultaneous outgoing calls?

From Dev

Getting SMS Twilio message sid as it is being created from an outgoing message

From Dev

Twilio Ability to use same number for two simultaneous outgoing calls?

Related Related

  1. 1

    Add A New Outgoing Caller ID using REST API Twilio

  2. 2

    twilio say something to caller (node.js)

  3. 3

    twilio say something to caller (node.js)

  4. 4

    How to create confirmed outgoing caller ID from Toll-free twilio numbers?

  5. 5

    Node.js Twilio make calls using REST API

  6. 6

    filter outgoing requests in node.js for logging

  7. 7

    Using the Twilio Client API can you answer a specific caller in the queue

  8. 8

    New Caller Insert to Database with Codeigniter using the Twilio API

  9. 9

    Twilio outgoing call id

  10. 10

    Separate Twilio caller ID

  11. 11

    Twilio Screen Caller with Voicemail

  12. 12

    verifiy twilio caller ID

  13. 13

    Twilio Outgoing call via batchfile

  14. 14

    Kurento recording caller and callee stream in node.js

  15. 15

    How to get caller ip in node.js + express?

  16. 16

    Twilio - Outgoing call - play DTMF tones

  17. 17

    Return info after Twilio client outgoing call

  18. 18

    Twilio multiple agents one number for outgoing calls

  19. 19

    Node.js sequelize embed hasMany IDs

  20. 20

    Node.js webcrawler can't hanlde more than 50 simultaneous outgoing connections

  21. 21

    Twilio Inbound SMS issue using Node.js

  22. 22

    deleting a call recording from twilio in node.js

  23. 23

    Twilio MMS with Node.js - Sending multiple media files

  24. 24

    node js twilio send sms doesn't work

  25. 25

    Twilio Call Logs (Node.js helper Library)

  26. 26

    Getting error '_http_outgoing.js:335' while sending API response from backend to frontend

  27. 27

    Twilio Ability to use same number for two simultaneous outgoing calls?

  28. 28

    Getting SMS Twilio message sid as it is being created from an outgoing message

  29. 29

    Twilio Ability to use same number for two simultaneous outgoing calls?

HotTag

Archive