Overview
Link Shortening is a Messaging Services feature that allows you to send messages with shortened links using your own company-branded domain. Twilio also provided click tracking with the Link Shortening feature, so you can track customer engagement with your messages' shortened links. Link Shortening/click tracking is one of the features of Twilio's Engagement Suite.
When Link Shortening is used, Twilio converts long links from a message body and converts them to unique shortened links. The shortened links contain your Link Shortening domain, followed by ten alphanumeric characters.
What You Need To Know
- You must verify the domain or subdomain you want to use for the shortened URL.
- This domain or subdomain must be used exclusively for Twilio's Link Shortening.
- You must use a Messaging Service.
- You must pass the API parameter shortenUrls with a value of True.
- When a message is created and utilizes Link Shortening, you will incur an Engagement Suite fee per message. (The first 1,000 are free monthly)
- If you are using multiple Engagement Suite features on a message (i.e.. Message Scheduling and Link Shortening) or include more than one link in your message body, you will only incur the Engagement Suite fee once per message.
- An onboarding guide is available to help you get started.
Frequently Asked Questions
How much does it cost?
Using the Link Shortening feature adds the Engagement Suite fee to the cost of each message. However, the first 1,000 messages per month are exempt from this fee. The fee applies once per message, even if multiple Engagement Suite features are used or multiple links are shortened in the same message.
There are no costs associated with click events generated from a shortened link.
Do I have to have an SSL Certificate?
While an SSL certificate is required for Link Shortening, Twilio now offers a managed certificate solution for Link Shortening. This drastically simplifies the process of getting up and running with Link Shortening, and also removes the burden from you for setting up and managing the SSL certificate.
Twilio's managed certificate offering is free of charge.
Why did I get the error "Private key is invalid"?
There are many private key formats available. However, the Link Shortening feature currently only supports PKCS #8 formatted keys i.e., private keys that start with -----BEGIN PRIVATE KEY-----
.
A common mistake is trying to upload a PKCS #12 formatted key which instead begins with BEGIN RSA PRIVATE KEY.
Alternatively, you may consider using Twilio's managed certificate solution to avoid dealing with your own certificate and private keys.
Can I use Link Shortening with Content API?
As of November 2024, link shortening is not supported for messages created with Content API. This is on the roadmap for a future release.
Can I use Link Shortening with Twilio for Salesforce?
As of November 2024, link shortening is not supported for messages created with Twilio for Salesforce. There is not an ETA for when this will be supported.
Is it possible to enable Link Shortening as a default behavior for all messages sent?
No, it is not possible to enable Twilio's link shortening as a default behavior for all messages sent.
To shorten links in a message using Twilio's Link Shortening feature you must do the following during your Message POST request:
- Pass the MessagingServiceSid of a Messaging Service that has Link Shortening enabled.
- Include the parameter shortenUrls and set its value as True.
How do multiple clicks impact Click Tracking statistics?
Clicks are only counted once for metrics displayed in Messaging Insights. For click events delivered to a configured webhook, the event will trigger every time the link is clicked (for the life of the shortened link).
Conclusion
For more information about Twilio's Link Shortening feature, please refer to: