Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America

asked on 

short url on sms

I want to send link on twilio ... how can I do that?
HTMLC#

Avatar of undefined
Last Comment
Kelvin McDaniel
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

What code have you tried?

If the link is long, you may want to run it through a link shortner or a special URL on your server that will redirect.
Avatar of ITsolutionWizard

ASKER

c#
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

I added the C# topic for you.  

Which API documentation are you following? Do you have example code you have tried? Errors?  Or do you just need help getting started with Twillio?
Avatar of ITsolutionWizard

ASKER

I just need to know what is my option to send link inside of the Twilio SMS. Any API that is easier to implement will be fine.
Avatar of Rikin Shah
Rikin Shah
Flag of India image

Hi,

Check this blog-
https://blog.jeremylikness.com/build-a-serverless-link-shortener-with-analytics-faster-than-finishing-your-latte-8c094bb1df2c

You can create your own URL Shortner service. Or you can go for a paid service API that will give you your desired domain shortning url.

Do not go for goo.gl as they are soon going to end their support.
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

I do not believe there is a way to insert a link into text like you would with html.  Include a valid link like  https://www.experts-exchange.com/questions/29140168/short-url-on-sms.html and most devices should recognize that as a valid link.
Avatar of ITsolutionWizard

ASKER

Scott Fell, EE MVE: Then share with us what is the solution you think. Most of the companies like tmobile and twilio, they sent us a link for like payment reminder at all times,...
@ITSolutionWizard those companies are not sending you HTML; the SMS spec only supports text.
It's up to the app writer to provide support for turning that into an actionable link.

Here is a simple, very paired down example of what I'm currently using in an MVC application using the Twilio SDK (available via Nuget).

using System;
using System.Web.Mvc;
using Twilio;
using Twilio.Mvc;
using Twilio.TwiML;
using Twilio.TwiML.Mvc;

namespace EE29140168.Controllers
{
	public class SendMessageExampleController : TwilioController
	{
		public Twilio.Message SendMessage(string message)
		{
			var twilio = new TwilioRestClient("your twilio api key", "your twilio api token");
			return twilio.SendMessage("+18005551212", "+18005551313", message);
		}
	}
}

Open in new window

Avatar of ITsolutionWizard

ASKER

I have been seeing short URL link in SMS. and I really wonder how to get it working ....
Avatar of ITsolutionWizard

ASKER

Bitly API is one of those I found ... any one know how to use it?
Used to be that once you had gotten your Bit.ly application registered it was as simple as a GET call structured as follows:
https://api-ssl.bitly.com/v3/shorten?access_token=your_access_token&longUrl=url_encoded_address

Open in new window

However, I just checked and it appears they are depreciating API tokens in favor of OAUTH.

Another service I've used in the past is https://is.gd. There is a .NET library for using that one... but it's dead simple so a third party library is kind of unnecessary. A simple, anonymous GET to the api url is all that is required. For example, https://is.gd/Gwju6H is the result of the following call:
https://is.gd/create.php?format=simple&url=https%3A%2F%2Fwww.bing.com%2Fsearch%3Fq%3Dbit.ly%2Bapi%2Bdocumentation%26form%3DAPIPH1%26PC%3DAPPL

Open in new window

Avatar of ITsolutionWizard

ASKER

Kelvin, thank you for your post but i do not know what you mean. Can you describe little more clear how it supposes to work? I am very new about this short url feature.
ASKER CERTIFIED SOLUTION
Avatar of Kelvin McDaniel
Kelvin McDaniel
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
C#
C#

C# is an object-oriented programming language created in conjunction with Microsoft’s .NET framework. Compilation is usually done into the Microsoft Intermediate Language (MSIL), which is then JIT-compiled to native code (and cached) during execution in the Common Language Runtime (CLR).

98K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo