Sending voice message using @open-wa/wa-automate hosted on Raspberry Pi

We have already written few articles on @open-wa/wa-automate which is a splendid open-source project to play with whatsapp supporting docker and Easy API with its plug and play features. In this short articles we’ll focus on sending voice messages using Easy API.

Easy API requires arguments to process a request. For example for sending a voice message, two arguments are required in the form of json payload as shown in examples below.

Sending a voice message using base64 encoded URL:

{
  "args": {
    "to": "[email protected] or [email protected]",
    "file": "data:audio/mpeg;base64,base64-encoded-MP3"
  }
}

 

Sending a voice message using direct download URL:

{
  "args": {
    "to": "[email protected] or [email protected]",
    "file": "https://somewebsite.com/aFile.mp3"
  }
}

One can use a free base64 mp3 encoder at https://base64.guru/converter/encode/audio/mp3. For sending a voice message, do not forget to adopt the http post URL to "http://easy-api-server:port/sendPtt".

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x