
Do you have a community vkontakte? Does it happen that someone wrote a negative comment, insulted someone, or just wrote a review about your company or a question that you need to quickly answer? We wrote a microservice in PushAll, which allows you to receive notifications about various events in your communities. The fact is that Vkontakte recently rolled out the
Callback API for communities , and we decided to use it to oblige from the API into the format of push-notifications.
If you are too lazy to read and want to immediately use -
AdminVK (completely free, unlimited number of connected groups and communities)
')
How to use it?

You just need to subscribe to
the microservice channel and follow the instructions.
You register the microservice address in a special section in the settings of your group, and in the microservice settings you prescribe the code that you need to check with vkontakte. Also, you must pass authorization through OAuth VK in order for microservice to receive information about users - avatars and names.

After that, you will receive all notifications that you specify in the "Types of events" section.

It should be understood that not all types of events are supported:
- Messages
- Comments
- Records
- Logout / Community Entry
- Discussions
These types come with the avatar and the user name of the user who initiated the event, with the name of the event and the event itself.

The remaining types, at the moment come in the form of "Unsupported notification" and transmit the entire JSON, which gives vkontakte. During the week they will be completed.
Where are the notifications coming?
For those who do not know where PushAll sends notifications:
- Android application
- Chrome add-on with history
- Web push in chrome (Android + PC), Yandex browser, vivaldi, firefox, Safari
- Telegram bot
- Email
- iOS (Beta)
Coverage of devices and connectivity will increase.
Security
Vkontakte has come to security thoroughly - the script receives only the data you specify, and there is no access to control. Providing access to the API, which is required for avatars and usernames, only requests offline permission, without even asking for the user's email.
Restrictions
Microservice is completely free. You can connect several communities if you specify the same microservice address, while changing the verification code in the microservice settings each time. That is, you can connect an unlimited number of groups to receive notifications.
At the same time now there is no filtering - that is, all that you specify in the VK will come to you as a push. In the future, it podrumavaetsya
- Make it possible to transfer JSON to another script, that is, you can use AdminVK as a proxy, receive notifications, and send the request further to your analytics collection script or somewhere else
- Make it possible to specify trusted user IDs and user IDs that should receive notifications. Those. as an administrator, you can share your pushes on your moderators
- Filter by words. For example, getting not all the pushes, but only those that contain the names of certain brands - on the one hand the mention of a brand is not a reason for a ban, but here it depends on the context
- Distribution of notifications between moderators, i.e. based on the second point, it will be possible to evenly distribute incoming notifications to reduce the burden on people
Why do we need it?
In essence, this is a “proof-of-concept”, that is, this microservice is created to show how PushAll can be used for small services related to notifications. For example, it took me about 1 hour to write the entire microservice to be ready to work in the form of the first alpha, using the standard PushAll API, and anyone can also write their own microservice that can send users notifications on various events on many platforms.
This is only the first microservice of many that we will do later.
To those who read to the end I remind the subscription link:
AdminVKPs.


Added support for photo, video, audio, messages. Everywhere where you need to show either a preview or avatar of the user, shows the one who posted the content, and when clicked, links lead to the content itself. And it turned out that on VKontakte you can give a direct link to the audio, when you switch to which you immediately play (it’s legal at all? :))