Skip to content

maVovk/vk_to_tg_duplicator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vk_to_tg_duplicator

Automatically duplicate your posts from VK to Telegram channel

Automatically copies all photos, videos are provided as links to VK video(example https://vk.com/video227594082_456241827). Also, if the author is mentioned in VK post, link to his profile will be added to Telegram message. All posts that are marked as advertisiment won't be posted in Telegram(can be changed)

Setup

  1. git clone https://github.com/maVovk/vk_to_tg_duplicator.git
  2. Set all token variables in .env file. Instructions on how to get all tokens are given there.
  3. Make bot an administrator in Telegram channel
  4. For debug pip install -r requirements.txt python main.py For production docker build -t vk_to_tg . docker run vk_to_tg

.env variables

VK_ACCESS_TOKEN

Go to https://vkhost.github.io/. Then click on VK Admin and follow the instructions.

Your acces token will be in the url between access_token and &expires_in

VK_GROUP_TOKEN

Open your community, then Manage->API usage

Enable LongPoll API and turn on notifications about new posts in Event types

Now create access token for your group, allow access to community's wall and copy token to .env file

VK_GROUP_ID_TOKEN

Go to https://regvk.com/id/, enter link to the group, click the button and copy public ID

TELEGRAM_TOKEN

Create your own bot via @BotFather, then copy access token

Go to your channel and add your bot as an administrator

TELEGRAM_CHANNEL_ID

Forward any post from your channel to @JsonDumpBot, find forward_from_chat field and copy id to .env file

If you need Telegram to Vk duplicator check here -> https://github.com/VeryBigSad/telegram_to_vk

About

Automatically duplicate your posts from VK to Telegram channel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published