U
U
Uno2017-07-26 03:31:45
In contact with
Uno, 2017-07-26 03:31:45

Can someone explain to me where their logic is?

Drop dead. What to do? Write to the bugtracker?
I used it like this (spaces so that the link is not cut off):
http s: //api.vk.com/method/messages.send?user_id=XXXXXXXX&access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&attachment=photoXXXXXX_XXXXXXX

{
    "error": {
        "error_code": 100,
        "error_msg": "One of the parameters specified was missing or invalid: message is empty or invalid",
        "request_params": [{
            "key": "oauth",
            "value": "1"
        }, {
            "key": "method",
            "value": "messages.send"
        }, {
            "key": "user_id",
            "value": "ThereWasMyId"
        }, {
            "key": "attachment",
            "value": "photoXXXXXXX_XXXXXXX"
        }]
    }
}

Let's proceed here :
... message - the text of a personal message. Required if attachment is not set.
string ...

... attachment - media attachments to the personal message, separated by commas ... The parameter is required if the message parameter is not specified. ...

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
EviLordusForever, 2020-05-18
@Noizefan

And I know what the problem is. You wrote attachment, but you need attachments. I'm almost as wrong now.

S
Sergey Sokolov, 2017-07-26
@sergiks

Due to the abundance of information provided, let's tell fortunes on coffee grounds:

  1. attachment alive? An error in its id makes it invalid, and the message will not leave without an attachment and without a message.
  2. does the attachment belong to the sender? If not, then you need to add access_key - in the same place, in the documentation at your link.
  3. API version? random_id you specify?

K
Konstantin Sazhenov, 2017-08-22
@sakost

I think you can send message with an empty value. Mb will work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question