How to send Decal/Clothing ID picture to Discord Webhook?

This is my current url: https://www.roblox.com/asset-thumbnail/image?assetId=10429530041&width=420&height=420&format=png

and this is my data I am encoding:

{
		["content"] = "",
		["embeds"] = {{
			["thumbnail"] = {["url"] = "https://www.roblox.com/asset-thumbnail/image?assetId=10429530041&width=420&height=420&format=png"},
			["title"] = "__**Uniform Approval**__",
			["description"] = "By NotRapidV (ID: 90537338)",
			["type"] = "rich",
			["color"] = tonumber(0xffffff),
			["fields"] = {
				
			}
		}}
	}

and this is what shows up:
image

I am using a proxy, and I’ve tried other Ids, but it doesn’t work. Does anyone have any ideas? Again, I am trying to upload a decal/clothing ID image to an embedded webhook.

Thank you in advance!

1 Like

https://thumbnails.roblox.com/docs
https://thumbnails.roblox.com/v1/assets?assetIds=10429530041&size=420x420&format=Png&isCircular=false
image

It still returns a blank image unfortunately

When you go to the url:
https://thumbnails.roblox.com/v1/assets?assetIds=10429530041&size=420x420&format=Png&isCircular=false

and take the https://tr.rbxcdn.com/bef2ec105bd0b3a4fadbf00f2db46b5a/420/420/Image/Png URL from the “imageURL” and paste it into the webhook, it works. Is there a way to just get this URL from that main URL?

The API returns a JSON string, you need to parse its ‘imageUrl’ field’s value, in the example above that’d be.

https://tr.rbxcdn.com/bef2ec105bd0b3a4fadbf00f2db46b5a/420/420/Image/Png

This is a direct link to the image you’re trying to display.

Is there an API I can follow to parse the ‘imageUrl’ field?

You’d use HttpService:GetAsync() to issue a request to the API, then you’d use HttpService:JSONDecode to decode the response, and finally you’d index the result’s ‘imageUrl’ field for the direct image URL.

Okay thanks, I’ve tried that and it returns an error of “HttpService is not allowed to access ROBLOX resources”.

Yes, direct requests to the ‘roblox.com’ domain are blocked, they’ll need to be issued through a proxy instead.

https://developer.roblox.com/en-us/api-reference/class/HttpService

  • Requests cannot be made to any Roblox website, such as www.roblox.com.

Works, perfect. Thank you! Saved me a bunch of time.