New user image link?

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… :sweat_smile:

So, does anyone know what the new way of working is to get a user’s headshot thumbnail?

Thanks in advance!

Kr
Jonas

This could help you.

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”}]}

Ah, they changed it to return a json object instead of redirecting to an image… :roll_eyes:

But I think I can work my way around that. thanks! :slight_smile:

Managed to work around it. For those interested, here is the PHP code :slight_smile:

<?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);

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