VK icon

VK

Работа с API ВКонтакте (личная страница)

❤️ Взаимодействия → Добавить в друзья

AI-generated

Summary

Send a friend request to a specified VK user by their user ID, optionally including a custom accompanying text.

Inputs

  • Источник данных (required) — Select whether to get the user ID from the previous node's input data ('Из входных данных') or to enter it manually ('Вручную').
  • Поле с User ID — If 'Источник данных' is 'Из входных данных', specify the field name in the input JSON that contains the user ID. Defaults to 'id'.
  • ID пользователя (required) — If 'Источник данных' is 'Вручную', manually specify the numeric user ID of the VK user to whom the friend request will be sent.
  • Текст заявки — An optional message to accompany the friend request.

Output shape

a single JSON object containing the requested user's ID, the response status code, and a description of the friend request status.

The response includes a status code where 1 = request sent, 2 = mutual friendship, and 4 = repeated request. Errors from the VK API are raised as node errors unless 'Continue On Fail' is enabled.

Examples

Example 1: Send a friend request manually to user ID 123456 with a custom note.

Set 'Источник данных' to 'Вручную', enter '123456' for 'ID пользователя', and optionally add text in 'Текст заявки'.

Example 2: Send friend requests to user IDs obtained from previous node input.

Set 'Источник данных' to 'Из входных данных', specify the input field for user IDs in 'Поле с User ID' (default 'id').

Links

Discussion