asternic / wuzapi

Simple RESTful API for WhatsApp in Golang (using the Whatsmeow multi device library)
MIT License
105 stars 58 forks source link

Example payload for List and Buttons #16

Open ssteeltm opened 1 year ago

ssteeltm commented 1 year ago

Hello, could you please share an Example of payload for List and Buttons ?

asternic commented 1 year ago

I think it only work with whatsapp business numbers which I have non for testing, so it will silentily discard the message if you do it with a regular whatsapp number. So I cannot say if it will work for you or not, but you can try from the command line with something similar to this for a list:

echo "{ \"Phone\": \"18005553333\", \"Title\": \"How you doin\", \"Description\": \"How you doin\", \"ButtonText\": \"How you doin\", \"FooterText\": \"asdasd asdmb nasdi\", \"Sections\": [ { \"Title\": \"How you doin 1\", \"Rows\": [ { \"Title\": \"Yes\", \"Description\": \"askjhdkjashdkjash\" }, { \"Title\": \"Yes\", \"Description\": \"askjhdkjashdkjash\" } ] } ] }" | curl -v -X POST -H 'Token: 123412341234' -H 'Content-Type: application/json' -d @-  http://localhost:8080/chat/send/list
ssteeltm commented 1 year ago

Thanks! I'll try with non and business number, feedback here.