Hello,
i am integrating with apple business chat api with product write in nodeJS. Among these avenues is the need to manage voice messages sent from the chat to my configured webhook.
the steps I take are:
I'm having a number of problems decrypting the file.
Has anyone encountered the same problem? Could you help me understand what I'm doing wrong?
Thank you
i am integrating with apple business chat api with product write in nodeJS. Among these avenues is the need to manage voice messages sent from the chat to my configured webhook.
the steps I take are:
reading the webhook and calling the API / preDownload
once I get the url I make a get and I get the decrypted file. below the request and my actual attempt to decrypt the content
Code Block return request({ "method": "GET", "uri": resp["download-url"], "timeout": 10000 }); }) .then((content) => { const iv = Buffer.alloc(16,0); const key = attachment.key.slice(2); let image = CryptoJS.AES.decrypt(Buffer.from(content, 'binary').toString('binary'), key, { mode: CryptoJS.mode.CTR, iv: iv, padding: CryptoJS.pad.NoPadding }); return image; })
I'm having a number of problems decrypting the file.
Has anyone encountered the same problem? Could you help me understand what I'm doing wrong?
Thank you