부분 중단share-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
질문함 약 5개월 전
선택한 답변
2

Hello,

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

7월 5일 오후 11: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월 7일 오후 11:25
Vishal

standard access will work.

7월 7일 오후 11:26
Bhargav

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

7월 7일 오후 11: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월 7일 오후 11:36
Vishal

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

7월 7일 오후 11: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월 7일 오후 11: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.

7월 8일 오전 1:31