SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Can I access Twilio REST API from my browser?

While Twilio Client allows you to make calls using Javascript and the Node.js helper library allows you to access Twilio REST API using server-side Javascript, we do not recommend accessing Twilio REST API directly from the browser using Javascript.

This is because in order to access the Twilio REST API directly from the browser you would need to include the REST API credentials, your project Account SID and Auth Token, in the Javascript. This would expose the secret credentials and allow someone to compromise the privacy of your project and potentially incur large fraudulent charges.

A better way to use Twilio REST API from the browser is to implement a custom web service application which accesses Twilio REST API. Your browser app can access your web service, e.g. using AJAX, and then your web service can access Twilio REST API. This will allow you to choose your own way of authorizing users to use Twilio without exposing your credentials to everyone who uses your service.

Have more questions? Submit a request
Powered by Zendesk