Ngừng hoạt động một phầnshare-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
Đã hỏi khoảng 5 tháng trước
Câu trả lời được chọn
2

Hello,

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

5 tháng 7 lúc 23:07
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 tháng 7 lúc 23:25
Vishal

standard access will work.

7 tháng 7 lúc 23:26
Bhargav

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

7 tháng 7 lúc 23:26
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 tháng 7 lúc 23:36
Vishal

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

7 tháng 7 lúc 23:48
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 tháng 7 lúc 23:57
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 tháng 7 lúc 01:31