How do I use this to get all the thumbnails of a game?

Continuing the discussion from How do I get every thumbnails of a game:

I don’t understand exactly how I’m supposed to use this solution to get all the thumbnails of any game.
What is supposed to be put in place of targetid? if i use it as the image url, and put the place id, it’s just the first thumbnail, and of course, won’t return a table. If i try to use it for a JSONDecode I just get errors or get back “http doesnt have access to that roblox resource”

I also tried to use the endpoint: https://thumbnails.rprxy.xyz/v1/games/multiget/thumbnails?countPerUniverse=999&format=Png&isCircular=false&size=256x144&universeIds=[universeId]
and couldn’t even get it to return JSON tables like OP, it just said parse error.

I would reply on the original post but it was made 5 years ago..

I believe the link he gave has probably been deprecated or something, nonetheless the proper way of getting the thumbnails of a game would be using this:

https://games.roblox.com/v2/games/aUniverseId/media -- after you use HttpService and do some stuff other stuff

Where “aUniverseId” is the universe Id of the game you want.


Also roblox does have it’s API listed in the documents, though it’s pretty hard to find which function is the one you need: https://create.roblox.com/docs/cloud/legacy/games/v1

Also to test out the media thing you should use this site (made by roblox): https://create.roblox.com/docs/cloud/legacy/games/v2#/GamesV2/get_v2_games__universeId__media.
Click “Try it out” then input your UniverseId (or 703124385 for Tower of Hell), then click execute (execute will appear after you click “Try it out”). Then you can scroll down and check what will be returned when you call the https://games.roblox.com/v2/games/703124385 /media (reminder again you have to do some extra stuff and not just call the link in a script to get the table).

To call it in a script you do something like this (this won’t work, technically it would if it weren’t for roblox prohibiting calling its own API service but we’ll get into that later):

local HttpService = game:GetService("HttpService") -- Have to enable some stuff first, just look up a different tutorial, this is just an example :/

function getMedia(univID)
	local link = HttpService:UrlEncode("https://games.roblox.com/v2/games/"..tostring(univID).."/media") -- changes the text into link that that can be searchable on the internet
	local data
	
	local didRun,returnVal = pcall(function() -- pcall checks if anything was returned cause it can fail to get the data
		local response = HttpService:GetAsync(link) -- actually (tries) to get the Data from link
		local JSONData = HttpService:JSONDecode(response) -- Decodes the table returned from the Link into Lua so the Script can read it
		data = JSONData["response"]["data"] -- just me shortening it
	end)
	
	if didRun then
		return data
	else
		warn("Failed to get game media "..univID)
		return nil
	end
end

local getTowerHeck = getMdeia(703124385)
local TowerHeckImg1 = getTowerHeck[1]["imageId"] -- gets the assest id of Tower of Hell 1st Thumbnail

As stated before this won’t work as roblox won’t allow you to call Roblox’s own API for security reasons or something idk I forgot. Thus, you’ll either need to make your own proxy or use a different proxy.

As for the rprxy.xyz proxy, it apparently shut down a few years ago

Also in that post, he showcases his own proxy(RoProxy), but I don’t know how to use it :p.

Honestly I’d suggest you make your own proxy, you can pretty easily make one by using Google Apps (Click here for tutorial). Also if you’re wondering, Google Apps uses JavaScript. If you have any trouble setting it up feel free to ask as the tutorial doesn’t show you some of the errors you might run into.

There’s also Roblox’s Open Cloud thing, never touched it before. Though from what I’ve read about it I believe it’ll let you call Roblox’s API without the use of a proxy. Anyway here’s a tutorial of someone making it work and the Announcement page of it.

If this doesn’t solve youre problem im gonna curse you >:(