- Google Account
- Go to Google Apps Script.
- Create a new project.
- You will be greeted with this screen, delete the contents of
myFunction
and click on "Untitled project" to rename it. - Copy the contents of
index.js
and paste it into the editor. - Follow the Getting your cookie instruction.
- Add your cookie to the code
- Add
DISCORD_WEBHOOK
with your Discord webhook (optional). - Click on save icon "Run" to run it once.
- When first running the script, you will be prompted to authorize the script.
- Click on "Review Permissions".
- Choose your Google account if prompted.
- You will be prompted to allow the script to access your Google account.
- Click on "Allow".
- After that when you run the script, the Execution log will show the output.
- Go to the Daily Check-In page here.
- Log in with your miHoYo account.
- Open the browser console (F12).
- Click on the "Application" tab.
- Type "lt" in the "Filter" bar.
- Paste the
ltoken
andltuid
value to the COOKIE array on the code.
If you want to automate the script, you can add a trigger to run it daily.