Getting account age from UserId (Not from property of a player)

Is there a way to get a player’s account age from their UserId? I couldn’t find anything like ‘game.Players:GetNameFromUserIdAsync(UserId)’ but for account age. If there’s some http work around please let me know (:

3 Likes

There is no Lua API to get this information for a user not in-game, and Roblox does not provide an official endpoint to retrieve a user’s age on the site. There might by an obscure internal API for it, but these are not documented anywhere and subject to break at any point in the future. If this works for you, you could try asking in the Roblox API Discord to see if anyone knows of an internal API for this. You will need to use a proxy to use Roblox APIs from game servers.

Alternatively, there may be less-bad solutions if you provide more information on what you’re trying to do. If, for instance, you want to show the age of users in a user database for your game, you can just convert their account age to a date, store that in the DataStore when they first join, and load it from the DataStore whenever. If you are trying to see if they joined before a certain date, you can look through UserIds on the website to find the last user who joined on that date, and just check if their UserId is <= that UserId.

6 Likes

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