0 Tk

API Credentials and Security

Securing Your Twilio API Access

Twilio uses Account SID and Auth Token for API authentication. These act as your username and password for API requests.

Find your credentials in the Twilio Console. Always keep these secret and never share them publicly.

All API requests must use HTTPS. Unencrypted HTTP requests will be rejected.

Example API request using cURL:

curl -X POST https://api.twilio.com/2010-04-01/Accounts/YOUR_ACCOUNT_SID/Messages.json \
--data-urlencode "To=+1XXXXXXXXXX" \
--data-urlencode "From=+1YYYYYYYYYY" \
--data-urlencode "Body=Hello from Twilio!" \
-u YOUR_ACCOUNT_SID:YOUR_AUTH_TOKEN

Replace YOUR_ACCOUNT_SID and YOUR_AUTH_TOKEN with your actual credentials.

Previous: Getting Started Next: Programmable SMS

Last updated 2 days ago