:GetUserThumbnailAsync() Not working for Roblox to Discord API

So, I’m testing and trying to learn how to use Discord’s Webhook API but there’s this error that keeps popping up
unknown (3)
And then when I removed

            ["image"] ={
                ["url"]= players:GetUserThumbnailAsync(player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size60x60);
            }

It works fine
unknown (4)

The script was working perfectly fine yesterday but it’s just broken today now
This is the script by the way

local players= game:GetService("Players")
local HS = game:GetService("HttpService")
local WebhookURL = "(WebhookURL)"

players.PlayerAdded:Connect(function(player)    
    local data ={
        ["content"] = "",
        ["embeds"] = {{
            ["title"] = "Test",
            ["type"] = "rich",
            ["color"] = tonumber(0xFFA500),
            ["image"] ={
                ["url"]= players:GetUserThumbnailAsync(player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size60x60);
            }

        }
    }
    }
    data=HS:JSONEncode(data)
    HS:PostAsync(WebhookURL,data)
end)
1 Like

"http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username="..player.Name

try this instead, the return from GetUserThumbnailAsync doesnt work as an image url for external use

but the url using the username does:

1 Like

Have you transferred this code to any other games since yesterday? You may not have “Allow HTTP Requests” enabled within game settings. It could also mean that the webhook link doesn’t exist or incorrect formatting of the request.

Yea… This is happening to me as well. Use this as an alternative.

"https://www.roblox.com/headshot-thumbnail/image?userId="..player.UserId.."&width=60&height=60&format=png"
3 Likes

I wonder why this started occuring all of a sudden, I only had this issue happen literally a day before this post was made but before it worked fine, but yeah the provided answers work fine.
I was confused which part of the embed was invalid for me until i realized that lol

The reason is because Roblox changed the format returned from GetUserThumbnailAsync, which works fine on site but isn’t actually a real website that Discord can get an image from.

Read More:

1 Like

Ohh I see!
I hardly ever get to keep up with the announcements, thanks for clearing up the confusion!

1 Like