{"id":15107924,"url":"https://github.com/taonity/vk-forwarder-bot","last_synced_at":"2025-07-05T19:12:25.389Z","repository":{"id":215668721,"uuid":"739141566","full_name":"taonity/vk-forwarder-bot","owner":"taonity","description":"A bot that forwards content from a VK group to a Telegram channel","archived":false,"fork":false,"pushed_at":"2024-09-26T14:21:29.000Z","size":16454,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-26T21:42:50.972Z","etag":null,"topics":["docker","kotlin","telegram","vk"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taonity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-04T21:43:17.000Z","updated_at":"2024-09-21T11:11:56.000Z","dependencies_parsed_at":"2024-05-08T06:30:51.352Z","dependency_job_id":"93be5d4f-8dde-4d28-8ff8-18f4dbb15d57","html_url":"https://github.com/taonity/vk-forwarder-bot","commit_stats":null,"previous_names":["taonity/vk-forwarder-bot"],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taonity%2Fvk-forwarder-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taonity%2Fvk-forwarder-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taonity%2Fvk-forwarder-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taonity%2Fvk-forwarder-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taonity","download_url":"https://codeload.github.com/taonity/vk-forwarder-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219868433,"owners_count":16555761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","kotlin","telegram","vk"],"created_at":"2024-09-25T21:43:07.820Z","updated_at":"2024-10-09T13:23:44.767Z","avatar_url":"https://github.com/taonity.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"## vk-forwarding-bot\nA bot that forwards content from a VK group to a Telegram channel\n\n### Features\n- Forward post photos and videos\n- Forward story videos\n- Polling VK once per hour to forward new content\n- HTTP endpoint to force forwarding cycle\n- 1 DB row per each VK-Telegram group-channel pair\n\n### How to run\nThe main challenge is to obtain a VK token. Besides that, the process is straightforward.\n\n#### Obtain VK token\nFollow the instructions:\n- Create a VK app here https://id.vk.com/about/business/go\n- If you have russian ID, then go to the Access tab and provide personal information\n- If you don't have russian ID, then you have to email devsupport@corp.vk.com the following details:\n  - ID of the account on the service https://id.vk.com/about/business/go\n  - Information about the type of identity document: passport/ID card/other.\n  - Country of issue of the document\n  - Information about the number of the identity document: series, number, and other data\n  - Phone number, which, if necessary, can be used for communication for data verification\n\n  A reply should arrive within several working days\n- In the Access tab toggle on Wall, Communities, Stories, and Videos advanced access (some accesses might be redundant).\n- Go to the App tab and fill the `Base domain` field with `localhost`\n- Fill `Trusted redirect URL` with `https://localhost`\n- Generate a token. Registering a separate VK account and generating the token by its name is a good idea.\n  - Send the request via browser to get `code`:\n      ```\n      https://oauth.vk.com/authorize?client_id=\u003cApp ID\u003e\u0026display=page\u0026redirect_uri=https://localhost\u0026scope=offline,photos,video,wall,groups,stories,status\u0026response_type=code\u0026v=5.199\n      ```\n    Some scopes might be redundant.\n  - Send the request via browser to get a `token`:\n    ```\n    https://oauth.vk.com/access_token?client_id=\u003cApp ID\u003e\u0026client_secret=\u003cSecure key\u003e\u0026redirect_uri=https://localhost\u0026code=\u003ccode\u003e\n    ```\n#### Obtain Telegram token\nFind https://t.me/BotFather Telegram bot, send `/newbot` command, and follow the instructions.\n\n#### Build\nThe best way to run the app is using IntelliJ. Clone the repo and open it with IntelliJ. `Run/Debug configurations` will be used to run the app. Create a Maven configuration with the following details in the fields:\n- Run - `clean package -DskipTests=true`\n- Profiles - `automation docker`\n- Modify options -\u003e Select Add VM options\n- VM options:\n  ```\n  -DFORWARDER_VK_TOKEN=\u003cVK token\u003e\n  -DFORWARDER_VK_USER_ID=\u003cVK user id\u003e\n  -DFORWARDER_VK_USERNAME=\u003cVK username\u003e\n  -DFORWARDER_VK_PASSWORD=\u003cVK password\u003e\n  -DFORWARDER_TG_TOKEN=\u003cTG token\u003e\n  -DFORWARDER_TG_BOT_USERNAME=\u003cTG bot username\u003e\n  ```\nMake sure Docker is up and press the Run button to build the project.\n\n#### Run\nRun `docker compose -f .\\target\\docker\\test\\docker-compose.yml up -d` to start the app.\n\n#### Add VK-Telegram group-channel pair\nUse a DB GUI to access Postgres. Use the credentials from this [env file](src/templates/docker/.test-env).\nAdd a row into the `vk_group_details` table:\n```\nINSERT INTO vk_group_details (vk_group_id,tg_channel_id)\nVALUES (\u003cVK group id\u003e,'\u003cTG channel id\u003e');\n```\nThe table column's description\n\n| id               | vk_group_id                                                           | last_forwarded_post_date_time                    | last_forwarded_story_date_time                     | tg_channel_id                          |\n|------------------|-----------------------------------------------------------------------|--------------------------------------------------|----------------------------------------------------|----------------------------------------|\n| Optional         | Required                                                              | Optional                                         | Optional                                           | Required                               |\n| Autogenerated id | See this [FAX](https://vk.com/faq18062?lang=en) to know how to get it | By default is taken as current time minus 1 hour | By default is taken as current time minus 24 hours | Use https://t.me/myidbot to get the id |\n\n#### Start forwarding\nTo start forwarding you can either restart the app container or send the HTTP request `GET http://localhost:9015/forward` with the `Authorization` header `1234`.\n\n### Deploy\nThe app can be deployed manually or using [generaltao725/docker-webhook](https://github.com/taonity/docker-webhook) tool. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaonity%2Fvk-forwarder-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaonity%2Fvk-forwarder-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaonity%2Fvk-forwarder-bot/lists"}