Turn "rbxthumb" into image links?

I am trying to turn “rbxthumb://type=AvatarHeadShot&id=2685270261&w=420&h=420” Into a image link. This link will be used to set the avatar of a webhook.

When I try to get the image link using this script:

Script

local content = Players:GetUserThumbnailAsync(player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)

It sends back " rbxthumb://type=AvatarHeadShot&id=2685270261&w=420&h=420"

2 Likes

I think it should be like this Size(420x420))

You can request a GET request to https://thumbnails.roblox.com/v1/users/avatar-headshot?userIds={UserId}&size=420x420&format=Png&isCircular=false and the imageUrl field is what you’re looking for.

1 Like

No, it shouldn’t be like that.

Pretty sure you can’t send get requests to a roblox API website through a roblox experience.

1 Like

Yeah… that’s not it lol; im trying to turn the thing into a image link.

How would I do that? I’ve never worked with API before

What are you trying to do with the thumbnail link?

If you are trying to set the avatar url of a webhook, simply do something like

"avatar_url": "https://www.roblox.com/headshot-thumbnail/image?userId={UserId}&width=420&height=420&format=png",
1 Like


Like this

Yup, just fill out the {UserId} field

Well, the UserId is supposed to be based off who is using the admin pannel. I can change it to player.UserId and maybe it will work?

The player is who is using the admin panel at the moment so maybe that’s gonna work.

Simply do this

"https://www.roblox.com/headshot-thumbnail/image?userId=" .. player.UserId .. "&width=420&height=420&format=png"
1 Like

That’s what I was just typing haha, thanks! I will try it immediately and let you know if it worked.

I hope it works out haha. If not, let me know.

It’s a blank photo… Idk if that supposed to happen.

Your avatar is moderated
image

Try removing moderated assets and try again

Oh my god ur so smart TYSM <3333333

Glad that it worked out for you.