Let's get started!
The first thing we will need are your account credentials.
With our account credentials, we can us the Twilio Node.js module to retrieve Twilio call logs.
You can use Twilio’s REST API to retrieve logs about the phone calls to and from your Twilio account. If you just want to check a couple logs, however, you should try looking at the voice logs in your Twilio console first.
To list all phone calls for your Twilio account, just call
list method automatically handles paging for you, eagerly fetching all records and paging under the hood. For more information, visit the Node.js Helper Library page.
You can also filter the results. This example only returns phone calls to the phone number "+15558675309" which had a call status of "busy" but you can filter on other call properties as well.
Finally, if you just want to retrieve information about a specific call you can get that CallSid directly.