Daily checkin tool for Hoyo games with Telegram notifications
  • Python 98.5%
  • Batchfile 0.7%
  • Shell 0.8%
Find a file
2026-05-31 20:32:47 +03:00
src Refactor v2.1: per-channel proxy, structured check-in results, per-account Telegram blockquotes 2026-05-31 20:22:50 +03:00
.env.example Refactor v2.1: per-channel proxy, structured check-in results, per-account Telegram blockquotes 2026-05-31 20:22:50 +03:00
.gitignore Refactor v2.1: per-channel proxy, structured check-in results, per-account Telegram blockquotes 2026-05-31 20:22:50 +03:00
CHANGELOG.md Fix incorrect execution method references in docs 2026-05-31 20:30:24 +03:00
LICENSE.md Complete project rewrite 2023-11-18 04:56:25 +03:00
MIGRATION.md Refactor v2.1: per-channel proxy, structured check-in results, per-account Telegram blockquotes 2026-05-31 20:22:50 +03:00
README.md Fix incorrect execution method references in docs 2026-05-31 20:30:24 +03:00
requirements.txt Bump python-dotenv from 1.0.1 to 1.2.2 2026-05-31 17:32:21 +00:00
run.bat Refactor v2.1: per-channel proxy, structured check-in results, per-account Telegram blockquotes 2026-05-31 20:22:50 +03:00
run.sh Refactor v2.1: per-channel proxy, structured check-in results, per-account Telegram blockquotes 2026-05-31 20:22:50 +03:00
SECURITY.md Create SECURITY.md 2025-11-02 22:37:16 +03:00

HoyoSignIn

Daily automatic check-in tool for HoYoverse games with Telegram notifications.

Contents

About

This is an enhanced version of the tool for automatic daily check-ins in HoYoverse games (Genshin Impact, Honkai: Star Rail, Honkai Impact 3rd, Tears of Themis, Zenless Zone Zero) with notifications via Telegram.

The project is intended for self-hosting on your PC or Cloud/VPS.

Supports Windows and Linux.

Features

  • Support for all HoYoverse games (Genshin, HSR, HI3, ToT, ZZZ)
  • Multiple account support
  • Individual Telegram notifications for each account
  • Secure secret storage with validation
  • Modern Telegram notifications with HTML formatting
  • Per-channel SOCKS5 proxy — independently route sign-in and Telegram traffic
  • Professional code architecture with type hints
  • Backward compatibility with old configurations

Prerequisites

  • Python 3.10 or higher
  • Git (for cloning the repository)

Installation

  1. Clone the repository:
git clone https://github.com/TFBosoN/HoyoSighIn
cd HoyoSighIn
  1. Install dependencies:
pip install -r requirements.txt

Configuration

1. Create .env file

Copy the configuration example (if .env.example exists) or create a new .env file in the project root.

  1. Create a bot via @BotFather in Telegram
  2. Get the bot token
  3. Get your Chat ID:

Add to .env:

BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id

3. Configure accounts

For each account, add:

# Account 1
ACCOUNT_12345_COOKIES=account_id=12345;cookie_token=xxx;ltoken=xxx;ltuid=12345;mi18nLang=ru-ru;_MHYUUID=xxx
ACCOUNT_12345_TELEGRAM_CHAT_ID=987654321
ACCOUNT_12345_ENABLED_GAMES=Genshin,HSR,HI3

# Account 2
ACCOUNT_67890_COOKIES=account_id=67890;cookie_token=yyy;ltoken_v2=yyy;ltuid_v2=67890;mi18nLang=en-us;_MHYUUID=yyy
ACCOUNT_67890_TELEGRAM_CHAT_ID=123456789
ACCOUNT_67890_ENABLED_GAMES=HSR,ZZZ

Parameters:

  • ACCOUNT_<ID>_COOKIES - required field, cookie string
  • ACCOUNT_<ID>_TELEGRAM_CHAT_ID - optional, Chat ID for individual notifications (if not specified, TELEGRAM_CHAT_ID is used)
  • ACCOUNT_<ID>_ENABLED_GAMES - optional, comma-separated list of games (default: all games)

Old Format (for backward compatibility)

You can use the old format for quick migration:

OS_COOKIE_Genshin=cookie1@cookie2@cookie3
OS_COOKIE_HSR=cookie1@cookie2

4. How to get cookies

  1. Open browser and go to https://act.hoyolab.com
  2. Log in to your account
  3. Navigate to the daily rewards page for the desired game
  4. Open developer tools (F12)
  5. Go to Application tab (Chrome) or Storage tab (Firefox)
  6. Find Cookieshttps://act.hoyolab.com
  7. Copy values from the following fields:
    • account_id
    • cookie_token
    • ltoken or ltoken_v2
    • ltuid or ltuid_v2
    • mi18nLang
    • _MHYUUID
  8. Assemble the string in the format:
    account_id=xxx;cookie_token=xxx;ltoken=xxx;ltuid=xxx;mi18nLang=ru-ru;_MHYUUID=xxx
    

Detailed guide: https://am-steph.github.io/wayscript-login-helper/

5. Additional settings (optional)

# User Agent (default is used if not specified)
USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0

Proxy (optional)

The proxy must be a SOCKS5 address. You can route sign-in API calls and Telegram notifications independently through the same proxy:

# SOCKS5 address — shared by both channels
PROXY_DATA=username:password@127.0.0.1:1080

# Enable proxy for game sign-in API calls
USE_PROXY_SIGNIN=true

# Enable proxy for Telegram notification calls
USE_PROXY_TELEGRAM=false

Set both to true if you want all traffic through the proxy. If you just want the old single-flag behaviour, USE_PROXY=true still works as a shortcut that enables the proxy for both channels.

Usage

Windows

Manual execution

Run run.bat or execute manually:

cd src
python -m __init__

Automatic execution via Task Scheduler

  1. Open Task Scheduler
  2. Create a Basic Task
  3. Give it a name (e.g., "HoyoSignIn Daily")
  4. Select trigger Daily
  5. Choose start time (servers reset at 16:00 UTC)
  6. Select action Start a program
  7. In "Program or script" field, specify: C:\<Path>\<to>\<project>\run.bat
  8. In "Start in" field, specify: C:\<Path>\<to>\<project>
  9. Click Finish

Linux

Manual execution

Run run.sh or execute manually:

cd src
python3 -m __init__

Automatic execution via cron

  1. Make run.sh executable:
chmod +x run.sh
  1. Open crontab editor:
crontab -e
  1. Add entry (example to run every day at 3:00 AM):
0 3 * * * /path/to/HoyoSignIn/run.sh

Security

⚠️ IMPORTANT:

  • NEVER commit .env file to git!
  • Keep cookies secure
  • Do not share your cookies with others
  • Regularly update cookies (they may expire)

The .env file is already added to .gitignore to protect your data.

What's New in Version 2.0

  • 🔒 Secure secret storage with Pydantic validation
  • 👤 Individual notifications for each account in Telegram
  • 📱 Enhanced Telegram notifications with HTML formatting
  • 🌐 Per-channel SOCKS5 proxyUSE_PROXY_SIGNIN and USE_PROXY_TELEGRAM let you route game API calls and Telegram traffic independently
  • 🏗️ Professional architecture with type hints and modular structure
  • 📦 Updated dependencies to latest versions
  • ♻️ Backward compatibility with old configurations (USE_PROXY still works)

Contributing

We welcome contributions to the project! Please:

  1. Fork the project
  2. Create a branch for your feature (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under GNU GPLv3.