thesadru / genshinstats

PLEASE USE GENSHIN.PY A python library that can get the stats of Genshin Impact players using Mihoyo's API. PLEASE USE GENSHIN.PY
https://thesadru.github.io/pdoc/genshinstats/
MIT License
268 stars 38 forks source link

Need help getting user info in Postman #1

Closed alwaysmda closed 3 years ago

alwaysmda commented 3 years ago

I'm trying to send a request and get user info according to genshinstats.py config but I'm not successful.

Method:

GET

Url:

https://api-takumi.mihoyo.com/game_record/genshin/api/index

Url Params:

role_id:700XXXXXX
server:os_euro

Headers:

x-rpc-app_version:1.5.0
x-rpc-client_type:4
x-rpc-language:en-us
ds:1618310743,q1wk73,dde2657a62e1cdac2eea2e1096ff8bfa #Generated every time
user-agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Cookies:

cookie_token=kPoanL1qqeFtp1ySoNrMO32378esdyflXXXXXXXX; path=/; domain=.api-takumi.mihoyo.com; Expires=Tue, 19 Jan 2038 03:14:07 GMT;

account_id=10XXXXXX; path=/; domain=.api-takumi.mihoyo.com; Expires=Tue, 19 Jan 2038 03:14:07 GMT;

This is the response I'm getting:

{
    "data": null,
    "message": "invalid request",
    "retcode": -10001
}

What am I missing?

Thanks.

thesadru commented 3 years ago

The url https://api-takumi.mihoyo.com/ is for Chinese accounts, you want to use https://bbs-api-os.hoyolab.com/.

alwaysmda commented 3 years ago

OMG! what a mistake! Problem solved. Thank you!