Authenticating Users

This page will correctly show you how to verify the authenticity of users after they've completed your advertisement links

API Endpoint: link.eleutheri.com/v1/

API License Validation: link.eleutheri.com/v1/project/:prefix/licenses/:license

API Discord ID Validation: link.eleutheri.com/v1/project/:prefix/discord/:discordID

Session Type: License Key

This section focuses on links with a session type of License Key. The recommended usage for this are Python programs, Lua scripts or any client-sided software which cannot securely authenticate using Discord ID's

This section is using an example link: link.eleutheri.com/keysystem/ The link display name could be "Hello World" but you'll still need to use keysystem in the API or whatever your link prefix is

-- The user inputted license 
local LicenseKey = trial_key or trialkey or LinkGuard or LinkGuard_Key;
if not LicenseKey then
    error("License Key is not defined", 0);
end;

--[[
* Request to our API to verify the authenticity of the license
* This code example is using link: https://link.eleutheri.com/keysystem/
]]
local Response = game:HttpGet("https://link.eleutheri.com/v1/project/keysystem/licenses/" .. LicenseKey, true);

-- Parse response body as JSON
local Body = game.HttpService:JSONDecode(Response);

-- If the 'valid' index is false, the license is invalid
if not Body.valid then
    error("Invalid Session")
end;

Session Type: Discord ID

This section focuses on links with a session type of Discord ID. The recommended usage for this are web applications or discord bots.

This section is using an example link: link.eleutheri.com/botexample/ The link display name could be "Hello World" but you'll still need to use botexample in the API or whatever your link prefix is

const DiscordID = "2323"; // Users Discord ID

// Request to our API to verify the authenticity of the ID
// This code example is using link: https://link.eleutheri.com/botexample/
const packet = await fetch(`https://linkguard.cc/v1/project/botexample/discord/${DiscordID}`);

// If the server returns a code other than '200', the ID is invalid
if (packet.status !== 200) {
    return console.log("Invalid Session");
}

// Parse response body as JSON
const body = await packet.json();

// # If the 'valid' index is false, the ID is invalid
if (!body.valid) {
    return console.log("Invalid Session");
}

console.log("Valid Session:", body);

Last updated