Answer the question
In order to leave comments, you need to log in
How to organize a notification of a new application on the landing page in a personal VK?
For there is not always time to check the mail, the VK message can be seen faster.
more interested in how to implement "from whom" ? I would not want to store the token on the server (although this is probably my paranoia). and if many people need to send a notification - do not sculpt a bunch of profiles for this
Answer the question
In order to leave comments, you need to log in
Options:
The messages.send() method sends a message from a user or community; secure.sendNotification() - notification from the application; secure.sendSMSNotification() - SMS from the application. Probably better to make a message from the Community.
Create a new closed group for yourself, where only you will be. Enable community messages and get a key (just copy it from Community Settings - Working with API.
When an event occurs in the landing page, open the VKontakte API link with a script, for example, like this:
$url = "https://api.vk.com/method/messages.send";
$params = [
'user_id' => 123456, // ваш user_id в ВК
'message' => 'Новая заявка!',
'access_token' => $TOKEN, // токен сообщества
'v' => 5.62
];
$url = $url . '?' . http_build_query($params);
file_get_contents($url);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question