Search code examples
smstwiliotwilio-api

Trying to create short link in Twilio SMS


I have an outbound application that sends SMS to customers.

In each SMS is a link to a web-page that they click on.

Each link is unique to each customer so that I can identify who they are.

I know there are short link tools around but I need to have a unique link for each customer.

Does Twilio have a nice solution for this? Or do I need to insert a long URL in each SMS.


Solution

  • Twilio developer evangelist here.

    Twilio doesn't have an in built URL shortener for plain SMS (though this is an option when sending MMS messages).

    I recommend using a URL shortening API, like the Bitly API. You can make a request to shorten your URL, then use the result when sending the SMS with the Twilio API.