Team,
Is the API supported? I am able to authenticate, and use the get-games endpoint, but the get-game-details endpoint generates a "404 Not Found"
Matchmaking API
Moderator: Bilka
Re: Matchmaking API
404 means the matching server doesn't know about the given game id, can you provide more details?
bringing the oops to devops
Re: Matchmaking API
Example (redacted token)
This returns (I am clipping it off)
If I then try and use any of those game IDs, like I get:
Code: Select all
https://multiplayer.factorio.com/get-games?username=squiddog&token=REDACTED
Code: Select all
[
{
"game_id": 12975085,
"name": "Factorio Server",
"description": "Hosted by Nodecraft.com",
"max_players": 0,
"application_version": {
"game_version": "1.1.61",
"build_version": 59839,
"build_mode": "headless",
"platform": "linux64"
},
"game_time_elapsed": 510,
"has_password": false,
"server_id": "wkhWdIc4jhl/wKYb6LY0RXeJ+CZHDnMHEjaUwlygAWQ=",
"tags": [
"game",
"tags",
"nodecraft"
],
"headless_server": true,
"has_mods": true,
"mod_count": 51
},
{
"game_id": 12942089,
"name": "[WIF] Factorio",
"description": "Wif Factorio Server",
"max_players": 0,
"application_version": {
"game_version": "1.1.61",
"build_version": 59839,
"build_mode": "headless",
"platform": "linux64"
},
"game_time_elapsed": 1593,
"has_password": true,
"server_id": "Ucv60GgoeS+RZMsru/t7huCGIa1opmb9wZxJa9c6EM4=",
"tags": [
"game",
"tags",
"nodecraft"
],
"headless_server": true,
"has_mods": true,
"mod_count": 20
},
{
"game_id": 10955453,
"name": "Tuuttiposse Factorio Server!",
"description": "Einarin työhönvalmennus kurssi",
"max_players": 20,
"application_version": {
"game_version": "1.1.42",
"build_version": 59009,
"build_mode": "headless",
"platform": "linux64"
},
"game_time_elapsed": 1300,
"has_password": true,
"server_id": "PMlscmzh2ANhFroEg8+XjeSbrkYCtUb2tETLu9mkfGU=",
"tags": [
"tuuttiposse"
],
"has_mods": false,
"mod_count": 0
},
{
"game_id": 13010165,
"name": "factoribruh",
"description": "yeeeeeeeeeeeeeeet",
"max_players": 20,
"application_version": {
"game_version": "1.1.61",
"build_version": 59839,
"build_mode": "headless",
"platform": "linux64"
},
"game_time_elapsed": 796,
"has_password": true,
"server_id": "sb6uAghktQksXGNzqENXNdvtd4ILwflg9Smme5n7bsE=",
"tags": [
"mobiusnone"
],
"headless_server": true,
"has_mods": true,
"mod_count": 3
},
Code: Select all
https://multiplayer.factorio.com/get-game-details/?game_id=13010165
Code: Select all
<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try
again.</p>
Re: Matchmaking API
It seems more like the specific API "get-game-details" is not found. This is not an application error. Other Matchmaker API calls that have bad or missing parameters return explicit errors. I can misspell the key and it's the same error.
Re: Matchmaking API
It should be https://multiplayer.factorio.com/get-ga ... s/13010165, without the "?game_id=". This is documented here: https://wiki.factorio.com/Matchmaking_A ... me-detailssquiddog wrote: ↑Mon Jul 18, 2022 2:38 pm If I then try and use any of those game IDs, likeCode: Select all
https://multiplayer.factorio.com/get-game-details/?game_id=13010165
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: Matchmaking API
Well oh crap, that was obvious. Thanks!
Re: Matchmaking API
As long as I have you here....
Is there an easy way to, from the API, find a specific game (maybe matching a name)? Vs getting the list of all games and then parsing the JSON?
Is there an easy way to, from the API, find a specific game (maybe matching a name)? Vs getting the list of all games and then parsing the JSON?
Re: Matchmaking API
Never mind, I can use jq on the whole json and get my gameIDs and other info in a single line.