How to "Validate" a game ID

I am having the player input what is hopefully a game ID. My goal is to determine if this is a valid game ID that actually exists on roblox. I know I can check that it is in the proper numerical format and is the appropriate amount of characters, but is there any way to validate that the game exists itself?


You can use Market Place Service But you will need to do other things with it

You could encase this in a pcall function, & checking if the Player has entered a valid GameID or not you could use MarketplaceService’s GetProductInfo function checking if the player entered a valid place depending on what ID the player entered in:

local MPS = game:GetService("MarketplaceService")
local ID = 302940952492

local PlaceCheck
local success, whoops = pcall(function()
    PlaceCheck = MPS:GetProductInfo(ID)

if success and PlaceCheck and PlaceCheck.AssetTypeId == 9 then
    print("The player has entered a valid place ID")
    warn("The player has entered a incorrect valid place ID: ", whoops)

That could work, but are you sure a game is considered an asset?

Well, GetProductInfo returns a Dictionary of Information for the “item” you want to find (Such as the date it was created, the owner’s name, etc), if you’re referring to game.PlaceId then I believe that’s only possible across your games locally

The AssetTypeId could either be a Number, Enum, or Name

Im not even referring to game.PlaceId. Im referring to game.Id. Its the ID of the game (universe) itself. Not the place. Thats why im skeptical.

I believe you’ll probably need to send a proxy request possibly using something like rprxy then since I don’t think you can exactly get the game.Id in different games, you’d need to send one instead using a proxy

1 Like

Sadly, I am clueless on how to set up rprxy. If anyone thinks of an easier way, I would prefer that. If not, this will work. Thanks.

What do you mean by setting up rprxy?

It’s a proxy that lets you get data from the roblox website

HttpService:GetAsync("") -- Can't remember exact format

yeah thing is it gets ratelimited quite often so you have to selfhost it

1 Like