jvergerolle / Genshin-Impact-Wish-history-API

Description of the Genshin impact wish history API
31 stars 4 forks source link

How to get the auth key? #1

Closed Jelosus2 closed 2 years ago

Jelosus2 commented 2 years ago

Hi, i was trying to fetch my wish history by doing a request but says to me invalid auth key and i wonder how i can get it, thanks in advantage!

jvergerolle commented 2 years ago

Hi, yes since 2.3 version only authkeys issued to request the wish history are allowed, it's mentioned at the end of the README.

Mihoyo has changed the authentication method to request the API. The authkey to get wish data must be from the webview_gatcha app (wish history page) in order to get the wish history.

In order to get a valid authkey you have to look at the requests made when accessing the wish history page with a web debugging proxy.

Otherwise, after accessing the history in game on Windows, the wish history page URL is also written in %userprofile%\AppData\LocalLow\miHoYo\Genshin Impact\output_log.txt (for the global game client) or %userprofile%\AppData\LocalLow\miHoYo\原神\\output_log.txt on the Chinese client.

There is some powershell script like this one that can help you find the URL. I'm also working on a no-script / no installation version here is a prototype

Jelosus2 commented 2 years ago

ok, i solved the problem, thank you so much!