How do I get a link of a players profile picture and send it to a webhook

Hello i’m trying to make a webhook that sends everytime a player gets 10 kills in 10 seconds and i have no clue how to make the webhook show the player’s profile icon.

This is my current script:

local FinalData = HttpService:JSONEncode({
		["avatar_url"] = "",
		["content"] = "",
		["embeds"] = {
			{
				["title"] = "SUSPICIOUS ACTIVITY ! ⚠️",
				["description"] = "**An certain player has reached the maxium kill limit in \nunder a minute!!**",
				["color"] = 16619520,
				["fields"] = {
					{
						["name"] = "Username",
						["value"] = Username,
						["inline"] = true
					},
					{
						["name"] = "User ID",
						["value"] = UserId,
						["inline"] = true
					},
					{
						["name"] = "Job ID",
						["value"] = JobID,
						["inline"] = false
					}
				},
				["footer"] = {
					["text"] = "Please run a background check on the user above, as he MAY be cheating."
				},

			["thumbnail"] = {
				["url"] = game.Players:GetUserThumbnailAsync(UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
			}
			}
		},
		["attachments"] = {}
	})

Use thumbnail API with the user’s ID.

So for example, to get my profile picture you can use https://thumbnails.roblox.com/v1/users/avatar-headshot?userIds=342926012&size=48x48&format=Png which will return,

{"data":[{"targetId":34660101,"state":"Completed","imageUrl":"https://tr.rbxcdn.com/30DAY-AvatarHeadshot-649E0EFE84FD989B5B825A1F13E94330-Png/48/48/AvatarHeadshot/Png/noFilter","version":"TN3"}]}

and you can use the image URL as your webhook image.

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