Posts tagged with whatsapp

I'm testing whatsapp business api image section, it seems like the images available at platform are the ones which are getting displayed and no other images which I pick from s3 bucket or google images.

message = {"type": "image",                                "previewUrl": "https://cdn.shopify.com/s/files/1/0445/8545/1685/products/2_9082b428-a7fa-4648-84b5-b34cc1fea9a1_360x.png",                                "originalUrl": "https://cdn.shopify.com/s/files/1/0445/8545/1685/products/2_9082b428-a7fa-4648-84b5-b34cc1fea9a1_360x.png",                                "caption": "some caption",                                "filename": "Sample.jpeg"} 

headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/x-www-form-urlencoded', 'apikey': 'mykey', 'cache-control': 'no-cache', }

the above used url doesn't seem to be displayed in chat whereas https://www.buildquickbots.com/whatsapp/media/sample/png/sample01.png comes fine

My requirement is to send whatsapp message from the web page. So, it should be a single page which will have fields To Mobile number, message and send button.

I found the documentation from facebook that we need to get whatsapp business api for this. I also see some other tools like twilio to achieve this. It is just confusing that, If we can achieve it using whatsapp business api itself, why we require twilio So, My question here is, Is twilio or other third party tools really require to access whatsapp api.

Note: i am planning to do this implementation with node js.

Please clarify.

I was tring to configure and setup the developer environment of a single instance of the WhatsApp Business API.I had finished #Step 5 https://developers.facebook.com/docs/whatsapp/installation/dev-single-instance#step-5--verify-containers-are-running and the docker is running. enter image description here

Whenever I try to call https://localhost:9090 in browser but the error is "This site can’t be reached". then i used the command docker-compose logs,the error is MySQL is not up yet - sleeping and getaddrinfo for host "db" port 3306: Name or service not known enter image description here Here is db.env code

WA_DB_ENGINE=MYSQL WA_DB_HOSTNAME=db WA_DB_PORT=3306 WA_DB_USERNAME=root WA_DB_PASSWORD=testpass WA_DB_CONNECTION_IDLE_TIMEOUT=180000 

So anyone have idea please, thanks a lot.

The WhatsApp documentation states:

The contacts object provides all the information about the contact.

which also contains the wa_id which is

The WhatsApp ID of the contact.

Each inbound message has the contacts and messages fields, but I fail to understand why there would be multiple elements in the contacts field. As I understand it the wa_id from the contacts object is the sender's id which I should use to send messages back to the user who did send these messages. Also, none of the examples in the docs has more than one element in the contacts array.

So far I`m assuming that structure was in use when the business API still supported groups but I did not find anything supporting this assumption.

In which case does the contacts array contain multiple contacts?