telegram-hcaptcha-bot

Workflow

Screenshots

Landing page Verified Failed to verify

Documentation

How everything is connected

Signup for a new Telegram bot

  1. Create a new bot on telegram and note the secret token and the bot username: Creating a new bot - Telegram documentation
  2. Create a new account on hCaptcha and note the sitekey and the secret token
  3. Invite the bot to your Telegram channel and set it as admin

Setup hCaptcha Telegram Bot

  1. Navigate to directory in terminal
  2. Rename .env.sample to .env
  3. Set TELEGRAM_TOKEN, TELEGRAM_USERNAME, HCAPTCHA_SECRET, HCAPTCHA_SITE_KEY in .env
  4. Install pipenv
  5. Install dependencies: pipenv install
  6. Enter virtualenv: pipenv shell
  7. Run tests: pytest

Deployment process

For this challenge I decided to use heroku for deployment

  1. Signup for Heroku and install Heroku CLI
  2. Authenticate to Heroku: heroku login
  3. Create heroku app: heroku create and take note of the app url
  4. Set Heroku Buildpack: heroku buildpacks:set heroku/python
  5. Deploy app: git push heroku master