opengsq / opengsq-python

Python library designed for querying game servers. It supports 24 different query protocols and has been downloaded over 34,000 times.
https://python.opengsq.com/
MIT License
24 stars 3 forks source link

EOS Query Credentials #6

Closed GGHostDotGames closed 7 months ago

GGHostDotGames commented 7 months ago

I was able to use opengsq to query ARK:SA servers, using the example provided. But I can't query other EOS-based games. I get the error " ServerNotFoundException"

Are the credentials used in the example specific to ARK:SA? If so, how would one go about obtaining credentials for other games?

BattlefieldDuck commented 7 months ago

You are required to deconstruct the game’s executable file to access the game-specific credentials.

See: https://github.com/gamedig/node-gamedig/issues/396#issuecomment-1806765895

BattlefieldDuck commented 7 months ago

Here are the currently known credentials for the following games:

# The Isle - EVRIMA
client_id = 'xyza7891gk5PRo3J7G9puCJGFJjmEguW'
client_secret = 'pKWl6t5i9NJK8gTpVlAxzENZ65P8hYzodV8Dqe5Rlc8'
deployment_id = '6db6bea492f94b1bbdfcdfe3e4f898dc'
grant_type = 'client_credentials'
external_auth_type = ''
external_auth_token = ''
# Palworld
client_id = "xyza78916PZ5DF0fAahu4tnrKKyFpqRE"
client_secret = "j0NapLEPm3R3EOrlQiM8cRLKq3Rt02ZVVwT0SkZstSg"
deployment_id = "0a18471f93d448e2a1f60e47e03d3413"
grant_type = "external_auth"
external_auth_type = "deviceid_access_token"  # https://dev.epicgames.com/docs/web-api-ref/connect-web-api
external_auth_token = await EOS.get_external_auth_token(
    client_id=client_id,
    client_secret=client_secret,
    external_auth_type=external_auth_type,
)
# Ark: Survival Ascended
client_id = "xyza7891muomRmynIIHaJB9COBKkwj6n"
client_secret = "PP5UGxysEieNfSrEicaD1N2Bb3TdXuD7xHYcsdUHZ7s"
deployment_id = "ad9a8feffb3b4b2ca315546f038c3ae2"
grant_type = "client_credentials"
external_auth_type = ""
external_auth_token = ""

Getting Access Token

access_token = await EOS.get_access_token(
    client_id=client_id,
    client_secret=client_secret,
    deployment_id=deployment_id,
    grant_type=grant_type,
    external_auth_type=external_auth_type,
    external_auth_token=external_auth_token,
)

Retrieving Matchmaking Data

matchmaking = await EOS.get_matchmaking(deployment_id, access_token)

Retrieving Game Info

eos = EOS(
    host="5.62.115.46",
    port=7783,
    deployment_id=deployment_id,
    access_token=access_token,
    timeout=5.0,
)

info = await eos.get_info()