In my application i need to use twillio module API to send and receive sms.But i dont know how to call other API methods in node.js.Now im using node.js with socketstream.
In my application i need to use twillio module API to send and receive sms.But i dont know how to call other API methods in node.js.Now im using node.js with socketstream.
2
Answers
You can use the request module, the documentation has a lot of great examples how to call REST API methods.
And for Twilio you can read this guide “Getting Started with Twilio and Node.js” and use the twilio module.
Let’s assume you have an API call that is already working with curl, something like:
You will need to first install proper modules for your node.js:
Then you will need to create a js file with the following content: