canaria3406 / hoyolab-auto-sign

A lightweight, secure, and free script that automatically collect Hoyolab daily check in rewards. Supports Genshin Impact, Honkai Impact 3rd, and Honkai: Star Rail.
MIT License
411 stars 51 forks source link

Zenless Zone Zero Login returns error #52

Open rounak-codes opened 2 days ago

rounak-codes commented 2 days ago

After attempting to login or run the script , ZZZ login returns the following message in discord via webhook and login does not reflect in the login webpage. All other games' login is working as intended.

Shomen-ai commented 1 day ago

The same goes for me. I'm running a script for two accounts, and get 活动已结束 (-500012) on first account and 操作频繁,请稍后再试 on second account.

Chillrend commented 1 day ago

+1 they probably changed the endpoint, i'll try looking at it

Chillrend commented 1 day ago

After a quick network inspect, the endpoint indeed changed to https://sg-public-api.hoyolab.com/event/luna/zzz/os/sign it also have a new header "x-rpc-signgame": "zzz"

Shomen-ai commented 1 day ago

So, it's necessary to declare and use special header for zzz?

Chillrend commented 1 day ago

Haven't tried through the script yet, but this is from network inspect when i clicked the sign button in hoyolab: image

Also the header specific to ZZZ: image

WiLuX-Source commented 1 day ago

First of all big shoutout to @rounak-codes for opening this issue and @Chillrend for all the extra details for solving the problem.

The code now requires a specific set of headers for ZZZ and here's how you need to do your requests before I PR.

Change your check out url for ZZZ to https://sg-public-api.hoyolab.com/event/luna/zzz/os/sign?lang=en-us&act_id=e202406031448091 and add one more header when making your request: "x-rpc-signgame": "zzz",

image

This will break other games but ZZZ will work again. I'm currently on it making custom headers for every game just in case it breaks again.

WiLuX-Source commented 23 hours ago

I would appreciate testing of my PR The Discord chinese version and both telegram versions needs testing waiting for feedback!

Chillrend commented 23 hours ago

Thanks @WiLuX-Source, I will try your PR on my script asap.

ChyrkunArtsiom commented 1 hour ago

Same thing started for HSR 活动已结束 (-500012) yesterday. For it header's value is hkrpg and request is https://sg-public-api.hoyolab.com/event/luna/hkrpg/os/sign.

WiLuX-Source commented 1 hour ago

HSR worked fine for me just 1 hour ago.

WiLuX-Source commented 1 hour ago

HSR still works fine.

ChyrkunArtsiom commented 1 hour ago

Hm, maybe they are rolling those changes in order for specific regions / accounts. Anyway I just copied your pr and updated for myself.

WiLuX-Source commented 1 hour ago

I created that PR to be able to change headers fast without going in too much detail. Glad it helped you.