vk.notifications.sendMessage

Sends a notification to the users of the application

NameRequiredTypeDescription
user_ids true Set[]

Comma separated list of user identifiers

message false String

Notification text, maximum 254 characters

message_id false String

Notification text identifier

fragment false String

Hash part in reference to application

Authorization

Session is required

Required permissions

  • VALUABLE_ACCESS

Restrictions

  • The method has a limit of 1 notification from the application per day for each user;
  • Only active application users can receive notifications from it. To count as an active user must have launched an application at least once in last 3 months;
  • When making calls with a developer token, you can send an unlimited number of notifications to application developers

Possible exceptions

If you fail to meet any of restrictions listed above notification won’t be sent to a user. Instead you will receive an error in method’s response depending on what restriction you failed to meet.

ReasonError textError code
Notifications are disabled for userNotifications are disabled1
Daily notifications limit is reachedSend rate exceeded2
User did not install an applicationNot authorized4
User did not launch an application for 3 monthsUser is inactive6

Type

{ "response": { "count": "int", "items": [ "Object" ] } }

Application paramters

User session data

Method

List of paramters

Используем для подписи secret_key = session_secret_key
Используем для подписи secret_key = application_secret_key
Используем для подписи secret_key = MD5(access_token + application_secret_key)
secret_key =
Сортируем и склеиваем параметры запроса и secret_key
Рассчитываем MD5 от полученной строки и получаем параметр sig