Discord-Link
Author:
Downloads: 997
File Size: 49.4 KB
Created:
Updated:
Mod ID: 1291879
Categories:

Discord-Link

Links EOS-ID to Discord-ID

๐Ÿ”— 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

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 a discord_id to a challenge code
  • DELETE /discord-link/{discord_id}: Unlinks a Discord ID
  • GET /link/{code}: Returns eos_id for a given challenge code
  • GET /discord-status/{discord_id}: Checks if a Discord ID is linked
  • GET /get-eosid/{discord_id}: Retrieves EOS ID for a Discord ID
  • GET /linked: Lists all linked players
  • GET /all: Lists all entries
  • GET /health: API heartbeat