Launcher API: Difference between revisions
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
<nowiki>https://marne.io/api/srvlst/</nowiki> |
<nowiki>https://marne.io/api/srvlst/</nowiki> |
||
<nowiki>https://marne.io/api/srvlst/<server_id>/</nowiki> |
<nowiki>https://marne.io/api/srvlst/<server_id>/</nowiki> |
||
= Connecting your launcher = |
|||
Connecting your own launcher is simple. The game and launcher communicate by exchanging JSON objects. |
|||
Before sending a JSON object you have to send the size of the object as ''int'' in a ''char'' representation. |
|||
To connect your launcher you have to create a JSON object with the following structure: |
|||
{ |
|||
command: "authenticate", |
|||
password: "<your_salted_and_hashed_pw>" |
|||
} |
|||
You have to append '''"w1@f._KDSFXV"''' as salt and hash the resulting password with the sha256 algorithm. |
|||
If the server received the correct password it will greet you with three JSON objects that contain the current status (map, players, etc.), the map rotation and the [[Settings|server settings (ServerSettings.txt)]]. |
Revision as of 18:10, 6 October 2024
Creating Your Own Launcher Using MARNE's Public API
This page is currently under construction. In the future, it will contain a detailed guide on how to create your own custom launcher using the public API provided by MARNE.
The API is already complete and ready to use, allowing you to develop custom launchers or tools to interact with MARNE servers. For more information on the available endpoints and how to get started, please refer to the official API documentation.
Stay tuned for updates!
Public API Endpoints for browsing servers
You can browse the online servers at the following endpoints. The server will respond with a JSON object containing a list of servers and the server details.
https://marne.io/api/srvlst/ https://marne.io/api/srvlst/<server_id>/
Connecting your launcher
Connecting your own launcher is simple. The game and launcher communicate by exchanging JSON objects.
Before sending a JSON object you have to send the size of the object as int in a char representation.
To connect your launcher you have to create a JSON object with the following structure:
{ command: "authenticate", password: "<your_salted_and_hashed_pw>" }
You have to append "w1@f._KDSFXV" as salt and hash the resulting password with the sha256 algorithm.
If the server received the correct password it will greet you with three JSON objects that contain the current status (map, players, etc.), the map rotation and the server settings (ServerSettings.txt).