Roproxy help (need get gamepass and product Icon)

Hey! How do i need get gamepass or dev product icon?
There is a code that i have rn:

function module.getProductURL(Info)
	local success, productURL = pcall(function()
		local assetId = Info.ProductId
		
		local URL = HttpService:GetAsync(`https://www.roproxy.com/asset-thumbnail/image?assetId={assetId}&size=420x420&format=png`)
		return HttpService:JSONDecode(URL)
	end)
	
	if success and productURL then
		productURL = productURL["data"][1].imageUrl
	else
		productURL = `https://tr.rbxcdn.com/180DAY-1104aaa4ec1b610e9b576ab9dc0b924a/420/420/Decal/Webp/noFilter`
	end
	
	return productURL
end

SOLVED

The code that i used:

local success, productURL = pcall(function()
	local assetId = Info.ProductId -- change to Gamepass id or Developer Product id
    local Info = MarketplaceService:GetProductInfo(assetId, Enum.InfoType.GamePass) -- Change Enum.InfoType.GamePass to Enum.InfoType.Product if you need
		
	local URL = HttpService:GetAsync(`https://thumbnails.roproxy.com/v1/assets?assetIds={Info["IconImageAssetId"]}&returnPolicy=PlaceHolder&size=420x420&format=png`) -- Getting main URL to icon
	return HttpService:JSONDecode(URL) -- Decode and returning
end)
	
if success and productURL then
	productURL = productURL["data"][1].imageUrl
else
	productURL = `https://tr.rbxcdn.com/180DAY-1104aaa4ec1b610e9b576ab9dc0b924a/420/420/Decal/Webp/noFilter` -- Image if asset icon not foundede
end
1 Like

MarketplaceService is for that.

Tutorial about this (Passes, for dev-Product look at pages in named “Earn” with big words)

MarketplaceService | Documentation - Roblox Creator Hub

2 Likes

i need url for webhook, not just image.

1 Like

Externally, you can use the https://thumbnails.roblox.com/v1/batch endpoint. Worth noting that developer products have two internal IDs, you can’t use the normal ID that Roblox normally provides you.

You can get this internal ID through:

  • Engine API: game.MarketplaceService:GetProductInfo(RobloxProvidedID, Enum.InfoType.Product).TargetId
  • Web API: https://apis.roblox.com/developer-products/v1/developer-products/{RobloxProvidedID}/details (TargetId in JSON response)

https://create.roblox.com/docs/cloud/features/thumbnails#/default/post_v1_batch

so im just need to use https://apis.roblox.com/developer-products/v1/developer-products/{RobloxProvidedID}/details to get icon?
and what is RobloxProvidedId? like just id of Developer Product?

THANK YOU SO MUCH!
I MADE IT.

CODE THAT I USED:

local success, productURL = pcall(function()
	local assetId = Info.ProductId -- change to Gamepass id or Developer Product id
    local Info = MarketplaceService:GetProductInfo(assetId, Enum.InfoType.GamePass) -- Change Enum.InfoType.GamePass to Enum.InfoType.Product if you need
		
	local URL = HttpService:GetAsync(`https://thumbnails.roproxy.com/v1/assets?assetIds={Info["IconImageAssetId"]}&returnPolicy=PlaceHolder&size=420x420&format=png`) -- Getting main URL to icon
	return HttpService:JSONDecode(URL) -- Decode and returning
end)
	
if success and productURL then
	productURL = productURL["data"][1].imageUrl
else
	productURL = `https://tr.rbxcdn.com/180DAY-1104aaa4ec1b610e9b576ab9dc0b924a/420/420/Decal/Webp/noFilter` -- Image if asset icon not foundede
end

OH! Dude, I think you might be able to just do Info.IconImageAssetId and avoid the Details request?

> =game.MarketplaceService:GetProductInfo(0, Enum.InfoType.Product)
{
    ["AssetId"] = 0,
    ["AssetTypeId"] = 0,
    ["Created"] = "2024-08-31T15:47:22.45Z",
    ["Creator"] =  â–¶ {...},
    ["Description"] = "Description",
    ["DisplayDescription"] = "Description",
    ["DisplayIconImageAssetId"] = 0,
    ["DisplayName"] = "Name",
    ["IconImageAssetId"] = 0,
    ["IsForSale"] = true,
    ["IsLimited"] = false,
    ["IsLimitedUnique"] = false,
    ["IsNew"] = false,
    ["IsPublicDomain"] = false,
    ["MinimumMembershipLevel"] = 0,
    ["Name"] = "Name",
    ["PriceInRobux"] = 0,
    ["ProductId"] = 0,
    ["ProductType"] = "Developer Product",
    ["TargetId"] = 0,
    ["UniverseId"] = 0,
    ["Updated"] = "2025-06-08T01:36:27.576Z"
}

Oops, my bad, I forgot that this exists in Roblox XD

But, in any case, I still have a problem with GamePasses…
When I use my code, everything works fine when the webhook sends the image, but when the GamePasses sends the image, it returns an error in the output, and the image appears as a “error” image in Discord.

IconImageAssetId should be returned by Marketplace:GetProductInfo() no matter what. Your code is very specifically coded for developer products.

It should fix itself if you use Info.IconImageAssetId instead of the Details request which is limited to developer products only.

1 Like

I already tested it, thanks you :slight_smile:
you made me a little bit smarter XD

1 Like

Sorry for asking another question, but I’m having some trouble…

When I try to purchase a Developer Product, the webhook can’t find productURL[“data”][1].imageUrl (i.e., there’s no productURL[“data”] or the table is empty).

What should I do in this situation?

I’ll assume the product doesn’t have an image, in which case you should just return nothing. I think it’s if IconImageAssetId == 0 or nil.

If it’s something else, like random errors, not sure I’d need more specifics. You should add checks, e.g. if productURL.data and productURL.data[1] and productURL.data[1].imageUrl then

ok, im try this
thanks for answering :0

yep, im used

local _errorImage = `https://tr.rbxcdn.com/180DAY-1104aaa4ec1b610e9b576ab9dc0b924a/420/420/Decal/Webp/noFilter`
	
	local success, productURL = pcall(function()
		local URL = HttpService:GetAsync(`https://thumbnails.roproxy.com/v1/assets?assetIds={Info.IconImageAssetId}&returnPolicy=PlaceHolder&size=420x420&format=png`)
		return HttpService:JSONDecode(URL)
	end)

	if success and productURL then
		local data = productURL["data"]
		
		if #data > 0 then
			productURL = productURL["data"][1].imageUrl
		else
			productURL = _errorImage
		end
	else
		productURL = _errorImage
	end
	
	return productURL

and thats works :slight_smile:
thanks so much, buddy

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.