when users sends a media file to the whatsapp business api how to downlod that image using URL
1

we integrated whatsapp business api in nodejs. we tested sending text messages, media files and receiving text messages , media files using webhooks. But the problem is when receiving media files for example users sends a image we received media id and based on media id we generate url , but using this url we didn't download the image. it returns 404 error and return facebook login page html code. whats the issue i have all permisssions whatsapp business management permission and whatsapp business messaging permission. it requires stardard accesss or advanced access.

Bhargav
Pregunta realizada hace aproximadamente 3 meses
Respuesta seleccionada
2

Hello,

You can refer to the guide, https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media/

5 de julio a las 11:07 p. m.
Vishal
Bhargav

I already referred this it shows to download media files require whatsapp business messaging and whatsapp business management permisssions. I have both permissions but the problem is i don't know it requires standard accesss or advanced access . i have standard access because i didn't verify my business.

7 de julio a las 11:25 p. m.
Vishal

standard access will work.

7 de julio a las 11:26 p. m.
Bhargav

without verifying business we can't download or view the media files

7 de julio a las 11:26 p. m.
Bhargav

And one another problem i faced is to send a template message it deliveres very slow almost it takes upto 1 minute. what is the reason?

7 de julio a las 11:36 p. m.
Vishal

There is a bug, and meta claims it will take 1 minute max.

7 de julio a las 11:48 p. m.
Bhargav

i have permissions with standard access but i am unableto download media files it returns 404 error when i run this command curl \ 'URL' \ -H 'Authorization: Bearer ACCESS_TOKEN' > media_file

7 de julio a las 11:57 p. m.
Vishal

You can see the same note in this section: https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media/#download-media

If media fails to download, you will receive a 404 Not Found response code. In that case, we recommend you try to retrieve a new media URL and download it again. If doing so doesn't resolve the issue, please try to renew the ACCESS_TOKEN then retry downloading the media.

8 de julio a la 1:31 a. m.