Ro.py - Get avatar thumbnails

For anyone here who use Ro.py, how to get avatar thumbnails by user id using ro py?

Documentation here.

Guide here, I personally use ro.py quite a lot, it’s very useful.


Was this your solution? Mark it as your solution if it works!

Is it the same ropy with Jmk ro-py

And also for heroku which works better, ro py or noblox js?

Also on the guide it says pip install roblox, but I supposed yours using install ro.py which one’s better?

This is my code now , is it correct, if wrong , can you tell me which part?

@app.get("/users/thumbnails")

async def read_items(key: str, user_id: int):

    if key == APIKEY:

        user = await client.get_user(user_id)

        user_thumbnails = await client.thumbnails.get_user_avatar_thumbnails(

            users=[user],

            type=AvatarThumbnailType.full_body,

            size=(420, 420)

        )

        if len(user_thumbnails) > 0:

            user_thumbnail = user_thumbnails[0]

            print(user_thumbnail.image_url)

        return (user_thumbnail.image_url)

    else:

        return "Incorrect key"

Well it’s incorrect because it logs ‘Client’ object has no attribute ‘thumbnails’
so how to get it then?

Full errors are much more helpful - Out of interest why are you creating this api?

I just want to use it because sometimes when I use roblox player thumbnail async idk why it just often gives me error. Can you help me on this?

Ahh i know why it doesn’t work because it says from ro_py.client import Client
So client would be module Client, but thumbnail is ro_py.thumbnails right?

So can i just from ro_py import Roblox
then after that Client = Roblox.client and Thumbnails = Roblox.thumbnails? Or I should from ro_py import Roblox
from Roblox.client import Client
from Roblox.thumbnails import Thumbnails?

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