Users

From RoAPI

Users are one of the multiple ID systems on Roblox and represent a single account on the platform. Each user has a unique, sequential ID.

Getting user information

To get user information, use the https://users.roblox.com/v1/users/USERID endpoint. It returns data that looks like this:
{
  "description": "Welcome to the Roblox profile! This is where you can check out the newest items in the catalog, and get a jumpstart on exploring and building on our Imagination Platform. If you want news on updates to the Roblox platform, or great new experiences to play with friends, check out blog.roblox.com. Please note, this is an automated account. If you need to reach Roblox for any customer service needs find help at www.roblox.com/help",
  "created": "2006-02-27T21:06:40.3Z",
  "isBanned": false,
  "externalAppDisplayName": null,
  "id": 1,
  "name": "Roblox",
  "displayName": "Roblox"
}
This is what that data consists of:
Field Name Type Explanation
description str The user's description.
created str The user's creation date as an ISO 8601 string.
isBanned bool Whether the user is banned.
externalAppDisplayName str? The user's external display name, maybe for Xbox.
id int The user's ID.
name str The user's name.
displayName str The user's display name.

Here is an example of this endpoint:

import requests

user_id = 1  # User ID
user_req = requests.get(f"https://users.roblox.com/v1/users/{user_id}")
user_data = user_req.json()

print("Name:", user_data["name"])
print("Display Name:", user_data["displayName"])
print("User ID:", user_data["id"])
print("Description:")
print(user_data["description"])
# Uses the http.rb gem. Run "gem install http" on your terminal to install it
require "http"
require "json"

USER_ID = 1
response = HTTP.get("https://users.roblox.com/v1/users/#{USER_ID}")
body = JSON.parse(response.body)

puts "Username: #{body["name"]}"
puts "Display name: #{body["displayName"]}"
puts "User ID: #{body["id"]}"
puts "Description: #{body["description"]}"
/*
    Cargo.toml dependencies:
    reqwest = { version = "0.11.4" }
    tokio = { version = "1.11.0", features = ["macros", "rt-multi-thread"]}
    serde_json = { vesion = "1.0.67"}
*/
use reqwest::get;
use serde_json::{from_str, Value};

const USER_ID: i64 = 1;

#[tokio::main]
async fn main() {
    let response = get(format!("https://users.roblox.com/v1/users/{}", USER_ID))
        .await
        .unwrap()
        .text()
        .await
        .unwrap();
    let body: Value = from_str(&response).unwrap();

    println!("Username: {}", body["name"].as_str().unwrap());
    println!("Display name: {}", body["displayName"].as_str().unwrap());
    println!("User ID: {}", body["id"].as_i64().unwrap());
    println!("Description: {}", body["description"].as_str().unwrap());
}
// Uses the Netwonsoft.Json package. Run "dotnet add package Newtonsoft.Json --version 13.0.1" on your terminal to install it.
using System;
using System.Net;
using System.IO;
using Newtonsoft.Json.Linq;

namespace your_first_request
{
    class Program
    {
        private const long USER_ID = 1;
        static void Main(string[] args)
        {
            WebResponse response = HttpWebRequest.Create($"https://users.roblox.com/v1/users/{USER_ID}")
                .GetResponse();
            JObject body = JObject.Parse(
                new StreamReader(
                    response.GetResponseStream()
                ).ReadToEnd()
            );

            Console.WriteLine($"Username: {body["name"]}");
            Console.WriteLine($"Display name: {body["displayName"]}");
            Console.WriteLine($"User ID: {body["id"]}");
            Console.WriteLine($"Description: {body["description"]}");
        }
    }
}
// npm install node-fetch
import fetch from "node-fetch";

const USER_ID = 1;
const response = await fetch(`https://users.roblox.com/v1/users/${USER_ID}`);
const body = await response.json();

console.log(`Username: ${body["name"]}`);
console.log(`Display name: ${body["displayName"]}`);
console.log(`User ID: ${body["id"]}`);
console.log(`Description: ${body["description"]}`);
const USER_ID = 1;
const response = await fetch(`https://users.roblox.com/v1/users/${USER_ID}`);
const body = await response.json();

console.log(`Username: ${body["name"]}`);
console.log(`Display name: ${body["displayName"]}`);
console.log(`User ID: ${body["id"]}`);
console.log(`Description: ${body["description"]}`);
// Uses the Netwonsoft.Json package. Run "dotnet add package Newtonsoft.Json --version 13.0.1" on your terminal to install it.
open System.Net.Http
open Newtonsoft.Json.Linq

[<EntryPoint>]
let main _ =
    async {
        use client = new HttpClient()

        let! response =
            client.GetStringAsync("https://users.roblox.com/v1/users/1")
            |> Async.AwaitTask

        let parsedBody = JObject.Parse response
        printfn $"""Username: {parsedBody.["name"]}"""
        printfn $"""Display name: {parsedBody.["displayName"]}"""
        printfn $"""User ID: {parsedBody.["id"]}"""
        printfn $"""Description: {parsedBody.["description"]}"""
    }
    |> Async.RunSynchronously

    0

Getting user status

To get a user's status, use the https://users.roblox.com/v1/users/USERID/status endpoint. It returns data that looks like this:
{
  "status": "Welcome to Roblox, the Imagination Platform. Make friends, explore, and play games!"
}
You can update the authenticated user's status by passing their user ID to this endpoint and sending a PATCH request with this body.