lyrftr
(lyrftr)
August 8, 2022, 6:53pm
1
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
Dfn150
(DevFunNewIdeas)
August 8, 2022, 6:56pm
2
I think it should be like this Size(420x420))
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
lyrftr
(lyrftr)
August 8, 2022, 7:59pm
5
Dfn150:
Size(420x420))
Yeah.. that’s not it lol; im trying to turn the thing into a image link.
lyrftr
(lyrftr)
August 8, 2022, 7:59pm
6
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
Yup, just fill out the {UserId} field
lyrftr
(lyrftr)
August 8, 2022, 8:28pm
11
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?
lyrftr
(lyrftr)
August 8, 2022, 8:29pm
12
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
lyrftr
(lyrftr)
August 8, 2022, 8:31pm
14
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.
lyrftr
(lyrftr)
August 8, 2022, 8:34pm
16
It’s a blank photo… Idk if that supposed to happen.
Try removing moderated assets and try again
lyrftr
(lyrftr)
August 8, 2022, 9:10pm
19
Oh my god ur so smart TYSM <3333333
Glad that it worked out for you.