Skip to content

Thereallo1026/HoYoLAB-Checkin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HoYoLAB Checkin

Features

  • Automated Daily Check-ins: Executes daily check-ins for HoYoverse games.
  • Auto Game Detection: Automatically detects which games are registered and performs check-ins accordingly.
  • Discord Notifications: Sends notifications to a Discord channel about check-in status and any relevant updates using webhooks.
  • Multiple Accounts Support: Handles check-ins for multiple HoYoLAB accounts simultaneously.

Getting Started

Prerequisites

  • GitHub Account
  • Discord Account
  • HoYoLAB Account
  • Network monitoring tool

Usage

  1. Fork the repository: Go to HoYoLAB-Checkin on GitHub and fork the repository.

  2. Retrieve Tokens from HoYoLAB: Use a network monitoring tool to capture the stoken and mid from HoYoLAB requests. For detailed instructions, please refer to this section.

  3. Add environment variables to GitHub Actions:

    • Go to the "Settings" of your forked repository.

    • Navigate to the "Security" section > "Secrets and variables" > "Actions".

    • Add the following repository secrets:

      HOYO_TOKENS=[{"stoken":"v2_XXXXXXX1234567890abcdefgHIJKLMN","mid":"1234567890_abc"},{"stoken":"v2_XXXXXXX1234567890abcdefgHIJKLMN","mid":"0987654321_def"}]
      WEBHOOK=https://discord.com/api/webhooks/000000000000000000/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  4. Test GitHub action workflow:

    • Make sure the action is triggered and runs correctly by executing it once manually from the GitHub Actions tab.

Configuration

  • Configuring tokens: Ensure your tokens are correctly formatted in the environment variables.
  • Setting Up Webhook: Add your Discord webhook URL to the appropriate environment variable.

Frequently Asked Questions

What is a network monitoring tool?

A network monitoring tool helps you inspect and analyze network traffic. Examples include Fiddler (Both Anywhere and Classic), HTTP Toolkit, and any other tool capable of proxying and monitoring device traffic.

Where can I find my stoken?

You can locate your stoken by monitoring requests to the endpoint that includes "getBySToken" from the HoYoLAB app, the URL should be https://sg-public-api.hoyoverse.com/account/ma-passport/token/getBySToken.

Both the stoken and mid can be found at the cookies header. Screenshot

Why did the script fail after a period of time?

The script may fail due to expired stokens or a HoYoLAB geetest challenge, while the chance of this happening is minimal, it's not impossible. To resolve this:

Geetest

Log in to HoYoLAB and complete the geetest challenge.

Expired tokens

Redo the setup process, and replace all expired tokens.

Contributing

  1. Fork this repository.
  2. Create a new branch for your feature or bugfix.
  3. Commit your changes and push the branch.
  4. Open a pull request describing your changes in detail.

Planned Features

  • Rewards Preview: Show the rewards you will get from the check-in.

Contact

For any questions or issues, feel free to: