whatsapp-cloud-api icon indicating copy to clipboard operation
whatsapp-cloud-api copied to clipboard

receive image and save it

Open jkupovic opened this issue 2 years ago • 3 comments

Hello everyone, is it possible to save an image that the user sends?

data: { mime_type: 'image/jpeg', sha256: '7P5nRXlN6yADTMqgDrqzycfaNWsddEQHOtHGN6hZxM4=', id: '5512756692174447' }

I don't understand how to do it thanks

jkupovic avatar Oct 17 '22 18:10 jkupovic

I found it

curl
'https://graph.facebook.com/v15.0/MEDIA_ID'
-H 'Authorization: Bearer ACCESS_TOKEN'

later

curl
'URL'
-H 'Authorization: Bearer ACCESS_TOKEN' > media_file

now i will make a function

jkupovic avatar Oct 17 '22 21:10 jkupovic

Glad you solved it! @jkupovic

tawn33y avatar Oct 18 '22 17:10 tawn33y

What does a solution look like? ... I'm assuming it doesn't involve calling curl ...

TEMHITHORPHE avatar Jul 12 '23 14:07 TEMHITHORPHE