Lookup
Roblox user lookup
A Roblox username to its user ID and back, with display name and join date.
GEThttps://api.samplebot.app/v1/roblox-user
Prefer a button to click? This tool also works in your browser at samplebot.app/tools/roblox-user.
Parameters
| Name | Description | Default |
|---|---|---|
user required | Username or user ID. |
Send them as query parameters.
Example request
curl
curl "https://api.samplebot.app/v1/roblox-user?user=Roblox" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
JavaScript (Node 18+)
const res = await fetch("https://api.samplebot.app/v1/roblox-user?user=Roblox", {
headers: { Authorization: `Bearer ${process.env.SAMPLE_API_KEY}` },
});
const { ok, data, text, error } = await res.json();
if (!ok) throw new Error(error.message);
console.log(data);
Python
import os, requests
res = requests.get(
"https://api.samplebot.app/v1/roblox-user",
params={"user":"Roblox"},
headers={"Authorization": f"Bearer {os.environ['SAMPLE_API_KEY']}"},
)
print(res.json()["data"])
Example reply
This is the real reply to the example request (a saved one, since the answer changes over time). Long lists are shortened here.
{
"ok": true,
"tool": "roblox-user",
"data": {
"id": 1,
"name": "Roblox",
"displayName": "Roblox",
"created": "2006-02-27T21:06:40.300Z",
"ageDays": 7562,
"isBanned": false,
"profileUrl": "https://www.roblox.com/users/1/profile"
},
"text": "Roblox (@Roblox)\nUser ID: 1\nJoined: 2006-02-27 (7562 days ago)\nhttps://www.roblox.com/users/1/profile"
}
Using it in your app
Read data for the values, or post text as it is: it is already formatted for Discord. Check ok first: when it is false, error.message says what went wrong in words you can show your users. Keep your key on your server, never in a web page or a Roblox game.