๐ Discord Link Mod
Link in-game player identities with Discord accounts using a unique challenge-code system.
๐ฅ๏ธ Features
- Displays a simple UI showing the playerโs EOS ID and a one-time challenge code
- Code is used externally to bind the account to a Discord user
- UI is accessed via the radial menu:
- ๐ฅ๏ธ PC: Hold
R - ๐ฎ PlayStation: Hold
Square - ๐ฎ Xbox: Hold
X
- ๐ฅ๏ธ PC: Hold
GameUserSettings.ini
[DiscordLink]
URL="http://127.0.0.1:8000"
The URL given should point to the server hosting the WebAPI
๐ผ Looking for a complete backend solution?
A fully functional package including the API server, DB setup and Discord bot is available for purchase.
The only thing you need is to generate a Bot-Token in the Discord Developer Portal.
A Video guide on how to do it will be provided.
If you're interested, feel free to contact me directly for details.
Discord
๐ ๏ธ Required API Endpoints
These endpoints must be available on your backend for the mod to function correctly:
POST /link
Creates a new link entry in the database with the EOS ID and a generated challenge code.
{
"eos_id": "{eosid}",
"code": "{challengecode}"
}
POST /update-code
Updates the challenge code for an existing EOS entry (e.g., when re-joining).
{
"eos_id": "{eosid}",
"new_code": "{challengecode}"
}
GET /is-linked/
Checks whether the current player (by EOS ID) is already linked to a Discord ID.
Returns:
// If not linked:
{ "linked": false, "code": "{challengecode}" }
// If already linked:
{ "linked": true }
๐ง Additional Optional API Endpoints
These are not required by the mod, but useful for dashboards or Discord bot integration:
POST /discord-link: Binds adiscord_idto a challenge codeDELETE /discord-link/{discord_id}: Unlinks a Discord IDGET /link/{code}: Returnseos_idfor a given challenge codeGET /discord-status/{discord_id}: Checks if a Discord ID is linkedGET /get-eosid/{discord_id}: Retrieves EOS ID for a Discord IDGET /linked: Lists all linked playersGET /all: Lists all entriesGET /health: API heartbeat