Answer the question
In order to leave comments, you need to log in
Why is the vk api bot not sending messages to the conversation?
I make a request in the form https://api.vk.com/method/messages.send?chat_id=*&... (I gave the admin to the bot in a conversation)
I put the group token in the access_token = error_code:10,error_msg:"Internal server error "
I'll put in the access_token the token taken from oauth.vk.com = everything works, but sends from my page.
Tried to make requests with peer_id adding 2000000000 all the same Internal server error
Error
{"error":{"error_code":10,"error_msg":"Internal server error","request_params":[{"key":"oauth","value":"1"},{"key":"method","value":"messages.send"},{"key":"chat_id","value":"**"},{"key":"random_id","value":"100"},{"key":"scope","value":"messages"},{"key":"v","value":"5.92"}]}}
Answer the question
In order to leave comments, you need to log in
To send messages to a conversation on behalf of a bot, you need to use a community token and a parameter peer_id
(in this case, it is not necessary to give an admin if you only want to send messages, and not change the name of the conversation, pin messages, exclude users, etc.).
Also, in the address you provided:
https://api.vk.com/method/messages.send?chat_id=*&message=текстv=5.80&access_token=***&random_id=100&scope=messages
you didn't put an ampersand in front of the parameter v
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question