📜 ⬆️ ⬇️

AdminVK - monitoring your own Vkontakte groups for new events using push notifications



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:

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:

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


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: AdminVK

Ps.


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? :))

Source: https://habr.com/ru/post/282297/


All Articles