Quantcast
Channel: Active questions tagged ampscript - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 359

Shortening URL with AMPscript (Bit.ly)

$
0
0

I am trying to send values to the cloud page. my code is this:

%%[    SET @caseId = [CaseID]     SET @lastremdate = [Last Reminder Date]    SET @Subscriber_ID = [Subscriber_ID]    SET @link = URLEncode(CloudPagesURL(5455,'caseId',@caseId))    SET @bitlyUrl = "https://api-ssl.bitly.com/v3/shorten?access_token=XXXXX&longUrl="    SET @shortenUrl = HTTPGet(Concat(@bitlyUrl,@link,"&format=txt"))]%%%%=Format(@lastremdate, "MMM dd, yyyy")=%% is your last reminder date, Please click here %%=v(@shortenUrl)=%%

but it's generating a faulty bitly link. however when I am pasting this code in email studio it's rendering the correct link which is leading me to the cloud page. but I need this in SMS. Please, help!


Viewing all articles
Browse latest Browse all 359

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>