I'm trying to send sms using the twilio-java helper library on a Java application. I would like to include a link in my sms and alt its text. How is that possible? Here's my code:
TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);
Account account = client.getAccount();
SmsFactory smsFactory = account.getSmsFactory();
Map<String, String> smsParams = new HashMap<String, String>();
smsParams.put("To", to);
smsParams.put("From", PHONE_NUMBER);
smsParams.put("Body", text);
Sms sms = smsFactory.create(smsParams);
SMS doesn't really do this - you can put the URL in the message like so:
http://www.twilio.com
But you cannot do this in HTML style like so:
Twilio
SMS is just raw text, then your device finds the URLs and makes them into links. The Twilio 'Url' parameter is for making calls, rather than for SMS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With