messagesSend: Sends a message.

Description Usage Arguments

View source: R/messages.R

Description

Sends a message.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
messagesSend(
  user_id,
  random_id = "",
  peer_id = "",
  domain = "",
  chat_id = "",
  user_ids = "",
  message = "",
  lat = "",
  long = "",
  attachment = "",
  forward_messages = "",
  sticker_id = "",
  v = getAPIVersion()
)

Arguments

user_id

User ID (by default — current user).

random_id

Unique identifier to avoid resending the message.

peer_id

Destination ID.

domain

User's short address (for example, illarionov).

chat_id

ID of conversation the message will relate to.

user_ids

IDs of message recipients (if new conversation shall be started).

message

Text of the message (required if attachments is not set).

lat

Geographical latitude of a check-in, in degrees (from -90 to 90).

long

Geographical longitude of a check-in, in degrees (from -180 to 180).

attachment

List of objects attached to the message, separated by commas, in the following format: <type><owner_id>_<media_id>

<type> — Type of media attachment:

  • photo - photo

  • video - video

  • audio - audio

  • doc - document

  • wall - wall post

<owner_id> — ID of the media attachment owner.

<media_id> — media attachment ID.

forward_messages

ID of forwarded messages, separated with a comma. Listed messages of the sender will be shown in the message body at the recipient's.

sticker_id

Sticker id.

v

Version of API.


Dementiy/vkR documentation built on Oct. 1, 2020, 9:48 a.m.