clever-lawyer-59955
04/04/2024, 10:22 AMjavascript
/* INSTRUCTIONS:
1. Create a Configuration Variable named "WHATSAPP_ACCESS_TOKEN" in the Bot Settings section of Botpress Studio.
2. Go to the "Configuration Variables" section of your bot in Botpress Cloud and set its value to your WhatsApp access token.
*/
const whatsappAccessToken = env.WHATSAPP_ACCESS_TOKEN
const res = await axios.get(workflow.url, {
headers: {
Authorization: `Bearer ${env.WHATSAPP_ACCESS_TOKEN}`
}
})
// This will be a JavaScript Buffer (https://nodejs.org/api/buffer.html) containing the raw binary content of the media file.
workflow.answer = res.data.toString("base64")
just like in the Documentation.
but i get html file
but in postman i get the image i need