How can I send .ogg file using whatsapp API ?

You can Send a ppt audio recording to the phone number or group, But WhatsApp is sensitive to this extension, you need to be in OGG format and the codecs should be the opus .

Example opus Ogg file :

Initially, to send a Voice clip using WhatsApp API you can use this route :

https://docs.ultramsg.com/api/post/messages/voice

.OGG example file :

https://file-example.s3-accelerate.amazonaws.com/voice/oog_example.ogg

You can record an audio clip in the WhatsApp application on the phone, then upload the file and upload it to your site or to a CDN, then use the URL and send the audio clip through the WhatsApp API to your customers,Or you can convert any mp3 or wav audio file to OGG using one of the free tools as in the next step.

Convert audio file to Ogg format:

Go to convertio.co website, And follow these steps :

image 4
step 1: Click “Choose Files”
image 6
step 2: select the OGG format
image 7
step3: click on the settings icon.
image 8
step4: select Opus codec.

congratulations… The file will be converted, and the file can be downloaded and uploaded to your site, then the OGG file will be sent via WhatsApp API through Ultramsg.