phptwiliotwilio-php

How to include a link in Twilio message in PHP?


I am working with Twilio API, where I have to send SMS to the registered users.
The problem is I want to include anchor links in the message, for example:

How to make 'Stack Overflow' a link to redirect to http://stackoverflow.com/?

However, it doesn't accept anchor tags.


Solution

  • Links cannot be embedded into an SMS message.

    SMS messages are plain text - it's up to the handset to convert the link to a clickable object for the user.

    Most modern smartphones will convert a link to a clickable object provided it starts with http or https and has a tld.

    http://clickme.tld for instance would work.

    Screenshot of clickable link within an SMS

    I sent myself a message

    Sample link http://stackoverflow.com
    

    and my handset converted it to a link.