D
D
denis952018-05-17 13:25:33
In contact with
denis95, 2018-05-17 13:25:33

Doesn't send message to user via api?

does not send a message to the user via api vk

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>vk api </title>
</head>

<body>
    
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
    <script>
        

       
            $.ajax({
                url: "https://api.vk.com/method/messages.send?user_id=480884186&massage=11111&access_token=ххххххххххххх&v=5.75",
                method: 'GET',
                dataType: 'JSONP',
                success: function(data){
        console.log(data);
        }

            });
        

        
    </script>
</body>

</html>

response from server
{"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":"480884186"},{" key":"massage","value":"11111"},{"key":"v","value":"5.75"}]}}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2018-05-17
@denis95

You send a massage instead of a message :)
{"key":"massage","value":"11111"}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question