Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. SQL Server
  3. Question
SQL Server

How to convert URL to Base64 guru ampscript?

Asked by Ranjana Admin Feb 7, 2023 4.1K views 1 answer
Share

About this question

An external system generates the qr codes. On marketing cloud we have to retrieve the qr code, then url, after that i should encode it in base64 and show it as an image in a template.


this is the code i am using:

%%[
var @getRequest
set @getRequest = TreatAsContent(HTTPGet("https://api.qrserver.com/v1/create-qr-code/?size=300×300&data=https://sfmarketing.cloud/"))
set @enc = Base64Encode(@getRequest)
]%%
%%=v(@enc)=%%

from what I understand, it does not directly convert url to the correct base64 for me because if I try to do it in https://base64.guru/converter/encode/url

Your answer

1 Answer

More SQL Server discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest SQL Server Blogs

Guides, tips and career advice on SQL Server from JanBask experts.