> ## Documentation Index
> Fetch the complete documentation index at: https://docs.adventure-builder.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Converting IDs into Data

> Transforming numeric IDs into valuable information

<img src="https://mintcdn.com/msoftware/i-jv3bnOSqdHu6dx/assets/api-reference/convertingIds.png?fit=max&auto=format&n=i-jv3bnOSqdHu6dx&q=85&s=fe8a042e21292c182bdeaaf5a901577b" alt="Conversion Example" width="2048" height="1044" data-path="assets/api-reference/convertingIds.png" />

When using various endpoints, you might notice that instead of receiving usernames directly, you receive numeric IDs.

To convert these IDs into meaningful information, you can use Roblox’s user and asset endpoints.

## Converting User IDs to Usernames

In Roblox, you can convert a user ID to a username using the [Players](https://create.roblox.com/docs/reference/engine/classes/Players) service.
Here's an example of how you could do it:

```lua username.lua theme={null}
local Players = game:GetService("Players")
local user_id = 1498851024 -- Replace with the ID of the user

-- Retrieve the username from the user ID
local username = Players:GetNameFromUserIdAsync(user_id)

-- Output the username to the console
print(username)
```

If you're working outside of Roblox, you can achieve the same result using their API endpoint:

<Card title="Roblox User Endpoint" icon="user" href="/api-reference/external/user" />

## Getting Thumbnails

If you’re working within Roblox, you can use the provided thumbnail ID directly in your scripts. Here's an example script, parent it to a Decal.

<Note>Make sure to include "rbxassetid://" in front of the ID.</Note>

```lua thumbnail.lua theme={null}
local thumbnail_id = 124996194907131 -- Replace with the thumbnail ID

-- Set the texture using the thumbnail ID
script.Parent.Texture = "rbxassetid://" .. thumbnail_id
```

For external use, you can leverage Roblox’s asset API to fetch thumbnails: <Card title="Roblox Asset Endpoint" icon="image" href="/api-reference/external/thumbnail" />
