- 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.
- GitHub Account
- Discord Account
- HoYoLAB Account
- Network monitoring tool
-
Fork the repository: Go to HoYoLAB-Checkin on GitHub and fork the repository.
-
Retrieve Tokens from HoYoLAB: Use a network monitoring tool to capture the
stoken
andmid
from HoYoLAB requests. For detailed instructions, please refer to this section. -
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
-
-
Test GitHub action workflow:
- Make sure the action is triggered and runs correctly by executing it once manually from the GitHub Actions tab.
- 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.
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.
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.
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:
Log in to HoYoLAB and complete the geetest challenge.
Redo the setup process, and replace all expired tokens.
- Fork this repository.
- Create a new branch for your feature or bugfix.
- Commit your changes and push the branch.
- Open a pull request describing your changes in detail.
- Rewards Preview: Show the rewards you will get from the check-in.
For any questions or issues, feel free to:
- Open an issue on the GitHub repository.
- Find me in any of the socials mentioned in my profile.