0

I want to send a member card as barcode via SFMC/Whatsapp. However, Whatsapp content does not allow the use of the BarcodeURL() function to generate the barcode image. My plan now is to use a code resource to create an endpoint that creates the image and uploads it to content builder via API which then gives me the published URL. I created the code resource which successfully generates and returns a BarcodeImageURL when I pass the member number. However, this BarcodeImageURL is not a direct link to a file but the barcode .gif seems to be generated when making the GET request. Now I'm stuck at the step where I need to do an HTTPGet to the BarcodeImageURL and convert the response into valid base64 that I can upload via API. The response is some type of binary that I can't seem to properly parse with SSJS, I think it's pretty much the same as this question. I actually found a piece of code that does exactly what I want for "modern browsers" in client side javascript, I need that blob() method. This is an example of a BarcodeImageURL. Does anyone know how I can manage this?

1 Answer 1

0

Unfortunately this is not possible with SSJS as it cannot properly interpret binary file data. Recommended route would be to use some kind of serverless function on AWS/GCP/Azure.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .