Simple Next.js website for sending real mobile SMS with Twilio.
- Copy env file and fill in Twilio values:
cp .env.example .env.local-
In Twilio Console grab:
- Account SID
- Auth Token
- A Twilio phone number (or verified caller ID on trial)
-
Install and run:
npm install
npm run devOpen http://localhost:3000.
Twilio trial accounts can only send to verified phone numbers. Verify your mobile under Phone Numbers → Verified Caller IDs.
POST /api/send-sms
{
"to": "+255712345678",
"message": "Hello from SMS Inter"
}