S
S
Stanislav Kudelko2016-01-01 15:34:37
Java
Stanislav Kudelko, 2016-01-01 15:34:37

How to send a voice message via VK API?

Nothing is said about it here . During the "investigation" I downloaded various clients. Kate mobile can send such a message, but once I saw him "naked". Let's just say that a file with the extension . From that moment I began to dig documentation in this place and it seems to me that message.send and docs are connected. How would in practice only send such a message?
P.'s. What I was able to unearth:

everything was put into paperwork. In the URL received by the docs.getUploadServer method, one parameter is added, ... I won’t say now what (I don’t remember, it seems, type) equal to audio_msg

Update:
With traffic sniffing, Kate was able to discover that an audio message was being downloaded by passing a HIDDEN parameter. Example:
https://api.vk.com/method/docs.getUploadServer?access_token=your_token&type=audio_message&v=5.38

Now a new stage of the question:
How to transfer a voice file in multipart / form-data format

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanislav Kudelko, 2016-01-01
@flerry

And here is the answer, obtained with sweat and blood :)
http://ru.stackoverflow.com/questions/609865/How about...

A
Alexander Boris, 2016-01-01
@Intel777

I tried to implement the same thing, but in python, as a result, having tried everything, I came to the conclusion that the stumbling block is the UUID that is present in the "boundary =" header, and is also transmitted immediately before the file flies away. There is no such duplication when loading other documents, where the UUID is transmitted once.
(Screenshot of an intercepted packet from the official application while sending an audio message)
ZWCQTPt8fL4.jpg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question