Getting JSON Data into image format


I have this GET request I built to call Google APIS dot com to get an image of a house at a given address. It’s all working fine. In Postman it displays the image from the body of the request. All good!

I converted the code to NodeJS REQUEST. Put that code into my project. It all works though the data returned is all �����JFIF������ like this in the BODY returned.

Can you point me to some resources or can you tell me in NODEJS how I get that into a Image type variable. I want to then display it using JSON code into Messenger Bot. I have the JSON code to send a IMAGE type back to Messenger - I just need to get the results of the GET above into a format in NODEJS that will work - like a PNG or JPG format.

It displays great in the Postman App. so you are somehow converting it to display it - what I am looking for.

Any help would be appreciated - or direct me to a resource that can help that would be great.


Hey @jcubinski, this looks like an issue with the encoding being used for the Node-style response body and the one required for your Messenger Bot integration. Could you provide more details on what format this Bot needs messages in (base64, etc)?