Skip to content
A web invite gateway for Discord with extra protection
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Discord Invite Gateway

Banner with logo


Discord Invite Gateway is a web gateway that offers additional protection against automated usage of Discord invites.


  • Modern responsive (yet basic) dark UI
  • Google reCAPTCHA (v2)
  • TOR exit node check
  • Guild information preview
  • Countdown before expiration (w/ true expiration)
  • Very dynamic configuration
  • Error handling
  • Debug mode (view raw Discord API response)


For this to function as intended, the following is required.

  • PHP 7
  • PHP cURL & JSON modules
  • Google account, with Google reCAPTCHA v2 (invisible) set up for the site this would be hosted on
  • Discord account, with an application created (a bot)


There are a couple files that you will need to make changes to. Look out for the names of the constants and variables mentioned in the tables below and modify their values to what they should be.

You will need to:


Constant Description
UI_TITLE Page and header title
UI_ICON Favicon
UI_STYLE_PATH Path to stylesheet
UI_THEME_COLOUR Google Chrome's mobile header and status bar colour
JQUERY_PATH URI for jQuery library
JQUERY_SRI_INTEGRITY Sub-resource integrity hash ( for jQuery library
JQUERY_SRI_CROSSORIGIN Sub-resource integrity cross-origin
LIFETIME_SAFE If visited the very last second, have there still be an invite page with spare time to join -- add on amount of seconds set here to expiry (refer to the next table)


Variable Description
token Discord application (bot) token -- Wiki entry with how-to
domain Domain of where the Discord API is located
channel ID of the channel (refer to the link in the token part of this table)
uri The entire URI -- don't really need to touch that
expiry Time (in seconds) before invite expiration (refer to LIFETIME_SAFE in the previous table)
maxuses Amount of times the same invite can be used
tempmem Temporary membership
defaulticon Icon to use if the guild has no icon set
ua User agent -- refer to Discord's documentation regarding UA format
grcuri Google reCAPTCHA API URI
grcseckey Google reCAPTCHA secret key
ctimeout cURL request timeout for all external backend communication (in seconds)
torchk Optional TOR exit node check (enabled by default)
  • To enable debugging, set the constant DEBUG (in the core class) to true

Adding the bot

Once you have all of that set up, add the bot to a guild of your choice using{CLIENT_ID}&scope=bot&permissions=1. Replace {CLIENT_ID} with your application's (bot's) client ID. permissions with 1 only grants the CREATE_INSTANT_INVITE permission which is required for the bot to create invites.

You can’t perform that action at this time.