xJon_as
(Jonas)
March 4, 2023, 10:38pm
1
Hello! We’ve been using this URL for ages in our application, but it seems like it broke now:
https://thumbnails.roblox.com/v1/users/avatar-headshot?userIds=USER_ID_HERE&size=420x420&format=Png&isCircular=false
I’ve checked other websites but they all seem to have no image anymore…
So, does anyone know what the new way of working is to get a user’s headshot thumbnail?
Thanks in advance!
Kr
Jonas
xJon_as
(Jonas)
March 4, 2023, 10:41pm
3
Unless I’ve read over this, I’m afraid I can’t use this. I forgot to specify that our application is a web application. So we really need a link and can’t use Roblox’s in-game api.
Thanks, though!
I have just ran that URL with my own UserId and it works alright, returning what is needed;
{“data”:[{“targetId”:138100978,“state”:“Completed”,“imageUrl”:“https://tr.rbxcdn.com/557312ca2c413c9d38340a25e514d683/420/420/AvatarHeadshot/Png ”}]}
xJon_as
(Jonas)
March 4, 2023, 10:47pm
5
Ah, they changed it to return a json object instead of redirecting to an image…
But I think I can work my way around that. thanks!
xJon_as
(Jonas)
March 4, 2023, 10:48pm
6
Managed to work around it. For those interested, here is the PHP code
<?php
// Get the user_id url parameter
$user_id = $_GET['user_id'];
// Fetch the thumbnail url:
$urlResponse = file_get_contents("https://thumbnails.roblox.com/v1/users/avatar-headshot?userIds=$user_id&size=420x420&format=Png&isCircular=false");
// Decode the response
$decodedResponse = json_decode($urlResponse);
// Get the image url
$imageUrl = $decodedResponse->data[0]->imageUrl;
// Redirect to the image url
header('Location: '.$imageUrl);
system
(system)
Closed
March 18, 2023, 10:49pm
7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.