Answer the question
In order to leave comments, you need to log in
How to receive a VK voice message?
Actually the whole question is how to receive / download a voice message that was sent as a personal message to a group using vkapi
Answer the question
In order to leave comments, you need to log in
As far as I remember, when you receive messages in the attachment array, there is a link to an audio file.
Haven't worked with vkapi for a long time, I may be wrong
Thank you! There was a link in attachments
{
"b'{\"type\":\"message_new\",\"object\":" {
"id": 111,
"date": 1111111111,
"out": 0,
"user_id": 111111111,
"read_state": 0,
"title": "",
"body": "",
"attachments": [
{
"type": "doc",
"doc": {
"id": 111111111,
"owner_id": 111111111,
"title": "voice_message.webm",
"size": 00000,
"ext": "ogg",
"url": "https:\\/xxxxx",
"date": xxxxxxxxxx,
"type": 5,
"preview": {
"audio_msg": {
"duration": 0,
"waveform": [ 0, 0, 0, 6, 6, 6 ],
"link_ogg": "https:\\/xxxxx",
"link_mp3": "https:\\/xxxxx"
}
},
"access_key": "xxxxxxxxxxxxxxxxx"
}
}
]
},
"group_id": 000000000
}'
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question