Partial Outageshare-external
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
Asked about 5 months ago
Selected Answer
2

Hello,

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

July 5 at 11:07 PM
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.

July 7 at 11:25 PM
Vishal

standard access will work.

July 7 at 11:26 PM
Bhargav

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

July 7 at 11:26 PM
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?

July 7 at 11:36 PM
Vishal

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

July 7 at 11:48 PM
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

July 7 at 11:57 PM
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.

July 8 at 1:31 AM