I am using the code below (just using stack exchange link for example):
%%[
var @Id, @shortenUrl, @cuttlyUrl, @link, @linkName
set @startDate = "2021-01-01 6:45 AM"
set @endDate = Now(1)
set @numOne = 100000
set @numTwo = 99999
set @randNum = random(@numOne,@numTwo)
set @time = dateDiff(@startDate, @endDate, "MI")
set @linkName = concat('repko-testing-',@time,@randNum)
set @link = 'https://salesforce.stackexchange.com/questions/122185/ampscript-in-sms-how-to-use-dynamic-content-in-sms-with-ampscript-mobileconne'
set @cuttlyUrl = Concat('https://cutt.ly/api/api.php?key=[key]&short=',@link,'&name=',@linkName,'&format=txt')
set @shortenUrl = HTTPGet(@cuttlyUrl)
]%%
Everything is working, but I am receiving a success response like below:
{"url":{"status":7,"fullLink":"https:\/\/salesforce.stackexchange.com\/questions\/122185\/ampscript-in-sms-how-to-use-dynamic-content-in-sms-with-ampscript-mobileconne","date":"2021-01-06","shortLink":"https:\/\/cutt.ly\/repko-testing-741599999","title":"marketing cloud - AMPScript in SMS - How to use dynamic content in SMS with AMPScript? MobileConnect - Salesforce Stack Exchange"}}
Which is great for knowing that I've setup my ampscript correctly, but I don't want the user seeing this. I'm just looking for the link. So I'm just looking for it to be like this: https://cutt.ly/repko-testing-741599999
I feel like theres a simple solution, but this is my first time doing this so I'm not sure what the next step is now.