Sending text message using spring boot with twilio
- First create a twilio refer to the provided links below on how to create twilio account.
- Second supply the appropriate values specified in application.properties file and everything should works fine
- And hit the this endpoint with request body of
POST http://localhost:{postNumber}/twillio/sendSMS
Content-Type: application/json
{
"receiverNumber": "+639#######",
"body": "Your message"
}
// Use the appropriate country code. For me in Philippines its +63
- Twilio Trail account only last for 45 days
- After this free Trail credit reaches to zero that will be your limit
docker run -itd --rm -p 8070:8070 --name tssa_app --env-file ./tssa.env elleined/tssa
docker compose --env-file ./tssa.env up
- Create twilio account: https://www.javadream.in/twilio-java-api-twilio-send-sms-with-spring-boot/
- Demo: https://youtu.be/lJxjTLU9pGs