ookamiiixd / baileys-api

Simple WhatsApp REST API with multiple device support
MIT License
432 stars 328 forks source link

cannot send a message #104

Closed riveleus closed 1 year ago

riveleus commented 1 year ago

request curl --location -g --request POST '127.0.0.1:8000/chats/send?id=john' \ --data-raw '{ "receiver": "628231xxxxx", "message": { "text": "hello this is bot!!" } }'

response {"success":false,"message":"Please fill out all required input.","data":{}}

aeinstein commented 1 year ago

API doc is wrong. USE:

curl --location -g --request POST '127.0.0.1:8000/chats/send?id=john' --header 'Content-Type: application/json' --data-raw '{ "receiver": "628231xxxxx", "message": { "text": "hello this is bot!!" } }'

ookamiiixd commented 1 year ago

Yeah i don't understand why postman request examples doesn't includes the headers. But the headers is there on the API docs, i suggest you to read more carefully next time.