I'm trying to send an audio to the whatsapp API, below the code and the return, it returns success but the audio does not arrive on the cell phone
SEND MEDIA
curl --request POST \
--url https://graph.facebook.com/v17.0/xxxxxxxxxx/media \
--header 'Authorization: Bearer EAAD....' \
--header 'Content-Type: multipart/form-data' \
--form file=@/Users/2_1687628467.mp3 \
--form type=audio/mp3 \
--form messaging_product=whatsapp
RETURN
{
"id": "969850597766683"
}
SEND MESSAGE
curl --request POST \
--url https://graph.facebook.com/v17.0/xxxxxxxxxx/messages \
--header 'Authorization: Bearer EAAD...' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "MY_PHONE_NUMBER",
"type": "audio",
"audio": {
"id": "969850597766683"
}
}'
RETURN SEND MESSAGE
{
"messaging_product": "whatsapp",
"contacts": [
{
"input": "MY_PHONE_NUMBER",
"wa_id": "MY_PHONE_NUMBER"
}
],
"messages": [
{
"id": "wamid.HBgMNTU2NTkyNjY1MDYwFQI=="
}
]
}