Roblox API to access player thumbnails?

I’m looking for a Roblox API or something i can use to fetch player avatar thumbnails like this:
image

Btw with what I’m doing, I won’t have access to the Player’s UserId/Username. I just have a serverId to look at the player avatar thumbnails.

I’m trying to make a script that checks the player’s thumbnail to determine if they are using the default avatar or not.

1 Like
1 Like

First, you have to fetch public servers from the games api. After you have gotten your result loop through all servers and gather all “PlayerTokens”, you have to repeat this process multiple times for big games since the api can only fetch 100 servers at once.

After acquiring all player tokens you have to make a batch request to thumbnails api. This will be done by a post request, example header in json:

{
    "requestId": "GUID, doesn't matter",
    "token": "PlayerToken",
    "type": "AvatarHeadShot",
    "size": "420x420",
    "format": null,
    "isCircular": true
  }

Multiple of these tables can be sent through headers to avoid overloading http request, although there also seems to be a rate limit to how many tables you can send, I suggest capping them at 100.

Upon receiving image urls, you can loop through all and check if they are identical to a bacon hairs image url (or any) to determine bots.

1 Like

Why are you looking at the server ID? Why not just run a script whenever someone joins the gam?

1 Like

I’m not using my game. I’m looking at different games and scraping the avatar thumbails.

1 Like

Thanks, I’ll mark this as the solution for now. I don’t have time to test this to see if it will work for my use case.

1 Like

Oh, ok. I think you’d have to use HTTP service in some way since you are pulling it off of a website. I’ve never really touched HTTP service though, so I wouldn’t know where to start.

1 Like

Yep, I’m using the games api to fetch serverIds and using a different api to scrape the thumbnails.

2 Likes