mukulhase / WebWhatsapp-Wrapper

An API for sending and receiving messages over web.whatsapp [Working as of 18th May 2018]
https://webwhatsapi.readthedocs.io/en/latest/
MIT License
2.02k stars 796 forks source link

How to download media from web whats app? #1067

Open Parveen-Mothsara opened 2 years ago

Parveen-Mothsara commented 2 years ago

Hi All, I want to download all type of media which received on whatsapp, when i try downloadFileWithCredentials getting below error

Access to XMLHttpRequest at 'https://mmg.whatsapp.net/d/f/Amfl9fbT6s0ZbKBbQnIoUNY59HhvCeMetp_QYU35Egg5.enc' from origin 'https://web.whatsapp.com' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

Please suggest.

wherculano commented 2 years ago

Hi All, I want to download all type of media which received on whatsapp, when i try downloadFileWithCredentials getting below error

Access to XMLHttpRequest at 'https://mmg.whatsapp.net/d/f/Amfl9fbT6s0ZbKBbQnIoUNY59HhvCeMetp_QYU35Egg5.enc' from origin 'https://web.whatsapp.com' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

Please suggest.

How are you getting the URL to use in that function?

Parveen-Mothsara commented 2 years ago

from

Hi All, I want to download all type of media which received on whatsapp, when i try downloadFileWithCredentials getting below error Access to XMLHttpRequest at 'https://mmg.whatsapp.net/d/f/Amfl9fbT6s0ZbKBbQnIoUNY59HhvCeMetp_QYU35Egg5.enc' from origin 'https://web.whatsapp.com' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute. Please suggest.

How are you getting the URL to use in that function?

From incoming message we get media url