chrishubert / whatsapp-api

This project is a REST API wrapper for the whatsapp-web.js library, providing an easy-to-use interface to interact with the WhatsApp Web platform.
https://www.christophehubert.com
Other
737 stars 348 forks source link

Send a message via a local URL #250

Open NiiiYaa opened 1 month ago

NiiiYaa commented 1 month ago

Hello, I wanted to ask if there's a way to send a message via a local URL (e.g., http://localhost:3000/...). If so, could you please provide the URL structure? Thank you in advance for your help.

mimail786 commented 6 days ago

Hi POST to url: http://localhost:3000/client/sendMessage/ABCD -H 'x-api-key: ' Body: { "chatId": "xxxxxxxxxxx@c.us", "contentType": "string", "content": "Test Message"
}

It works using https://www.usebruno.com/downloads But i'm not sure why it does not work from command prompt using curl URL rejected: Bad hostname Get methods work from the browser

Let me know if yours works from curl

Thanks