S
S
samp_andre2019-07-23 19:44:18
In contact with
samp_andre, 2019-07-23 19:44:18

VK_API How to forward the sender's message in a VK conversation?

I can't figure out how sender's message forwarding works

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Stockholm Syndrome, 2019-07-23
@StockholmSyndrome

messages.send with the forward_messages
UPD parameter:

$mesid = $data->object->id;
$request_params = array( 
  'message' => $retmes,
  'forward_messages' => $mesid,
  'chat_id' => '1',
  'access_token' => $VK_TOKEN,
  'v' => '5.81', 
  'random_id' => '0'
);

S
samp_andre, 2019-07-23
@samp_andre

$mesid = $data->object->id;
$request_params = array(
'message' => $retmes,
'forward_messages' => '255',
'chat_id' => '1',
'access_token' => $VK_TOKEN,
'v' => '5.81'
);
$get_params = http_build_query($request_params);
file_get_contents(' https://api.vk.com/method/messages.send? '. $get_params);
echo 'OK';
break;

L
lightmanLP, 2019-07-25
@lightmanLP

If your bot works for a group, then bad news. Id will not be returned to you. But you can use the conversation message id to get it. https://vk.com/dev/messages.getByConversationMessageId

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question