Skip to main content

GameHub API

An overview of the GameHub API and how the mirror server proxies it.

Deep Dive

All routes that are not handled by the mirror server are proxied directly to the origin server the only headers that are modified or added are the host header and the mirror header. All other routes besides the root route are generated using information fetched from the origin server.

User authorization is 3rd party and handled by https://auth.embernet.work/. Once the user has completed auth it will redirect back to the mirror server and give a session cookie which is used to access user information.

Routes

You can use mirror server routes in your application, though it is not recomened because the mirror server is designed for gamehub and could break when request requirements are not met.

PathMethodMirror OnlyAuth RequiredOther Information
/GETfalsefalseReturns the status of the server and what features are enabled on that instance
/gamesGETfalsefalseReturns a list of game names, thumbnails and ids
/games/:idGETfalsefalseReturns more detailed information regarding the game
/games/:id/recomendedGETfalsefalseReturns a list of two recommended games
/authGETtruefalseRedirects the user to the authorization page
/auth/finishGETtruetrueThe path the auth server will redirect to when authorization is finished
/meGETtruetrueReturns basic user information such as avatar info and username
/me/avatarGETtruetrueRedirects to the user avatar stored on the mirror server
/cdn/thumbnails/:idGETtruefalseReturns the avatar of the user as an svg or png
/cdn/assets/:id/:pathGETtruefalseReturns game files from the origin server
/cdn/thumbnails/:idGETtruefalseReturns the proxied game thumbnail
/analytics/:domainGETtruefalseGets the gamehub analytics id for that domain