- Google Account
-
Check-In URLs:
-
Getting the Cookie:
- Follow the HoyoLab Cookie Extraction Guide to obtain the cookie required for both daily check-ins and code redemption.
- Use an incognito/private browsing window as recommended in the guide to ensure you copy the correct account's cookie.
-
Create a New Project:
- Go to https://script.google.com/ (you'll need a Google account).
- Create a new project by clicking "+ New Project".
-
Paste the Code:
-
Configuration:
-
Paste your
cookie: In the config object, add the following (replace placeholders with your actual data):const config = { genshin: { data: [ // "account_cookie_1", // "account_cookie_2", // ... more account cookies ] }, honkai: { data: [ // "account_cookie_1", // "account_cookie_2", // ... more account cookies ] }, starrail: { data: [ // "account_cookie_1", // "account_cookie_2", // ... more account cookies ] } };
-
Discord notifications (optional): Set
DISCORD_WEBHOOKto your webhook URL to get a Discord message for every check-in.const DISCORD_WEBHOOK = "https://discord.com/api/webhooks/...";
-
Automatic code redemption (optional): Set
enableCodeRedemptiontotrueto redeem new codes after checking in. Not supported for Honkai Impact 3rd.const config = { enableCodeRedemption: true, // redeem new codes automatically notifyOnRedeemFailure: false, // also report codes that failed to redeem // ... };
When
DISCORD_WEBHOOKis set, one summary message is sent per account listing the codes that were redeemed and the rewards they granted. Nothing is sent when there are no new codes. Turn onnotifyOnRedeemFailureif you also want to hear about codes that failed - this includes a link to redeem them manually. Codes that fail for a temporary reason (expired cookie, redemption cooldown, network errors) are retried on the next run; expired, invalid, and already-used codes are not. -
Save the Project: Click on the floppy disk icon to save your project.
-
-
Before Running It:
-
Trigger the Function (Recommended):
- In the Apps Script editor, click on the "Triggers" icon (clock symbol) in the left sidebar.
- Click "+ Add Trigger" and configure:
- Function to run:
checkInAllGames - Event source:
Time-driven - Type of time-based trigger:
Day timer - Select time: Set your desired time for daily check-ins.
- Function to run:
- Save the trigger. This will automatically run your script every day at the specified time.
-
Final Step:
- Authorization: The first time you run the script, it will ask for authorization to access your Google account.
- Logs: View the execution logs by clicking on the "Executions" icon (play button symbol) in the Apps Script sidebar.



