How to get the join date of players using HTTP service

  1. The title explains it all, we know we need a proxy but we’re having trouble doing this and we’ve been trying for a while now.

  2. We can’t achieve the players join date for Roblox using the HTTP service.

  3. my friend and I have tried many solutions. We have also tried searching up help on both online and the forum and can’t find anything in our interest that we thought could help us.


This is some testing we tried with different domains. We managed to get counting the players friend count down but the join date part is still in our troubles.

If you can help in anyway possible we would really appreciate it.

1 Like

The player has an AccountAge (Player.AccountAge (roblox.com)) if you want to use that instead.

1 Like

Yeah I’ve realized that would be a good way but I am trying to accomplish it using the HTTP Service.

https://users.roblox.com/docs#!/Users/get_v1_users_userId

1 Like

Something like this c:

local HTTP = game:GetService("HttpService")

local data
local function getPlyData(id)
	local link1 = "https://friends.rprxy.xyz/v1/users/"..id.."/friends/count"
	local link2 = "https://friends.rprxy.xyz/v1/users/"..id.."/followers/count"

	data = {HTTP:JSONDecode(HTTP:GetAsync(link1)), HTTP:JSONDecode(HTTP:GetAsync(link2))}
end

print(dataGot[1]["count"])
print(dataGot[1]["count"])

Edit: I forgot the “count” :v

What is your use case for needing to use HttpService for this? It seems like you can roughly gain the join date (excluding time, which can be fairly inaccurate) all within the engine if you use the os library and the player’s AccountAge. Specifically, you’d be converting the player’s AccountAge into seconds and then going back that amount of time. Example with my account which is currently 3995 days old:

local joinTime = os.time() - (3995*86400)
local joinDate = os.date("!*t", joinTime)
print(joinDate.day, joinDate.month, joinDate.year) -- 28 2 2010

Is this accurate? Let’s check my profile.

There you go.

3 Likes

So you’re telling me that its not possible or barley possible to get a players join date using HTTP? Because I am really coming up to that conclusion from all the time I wasted trying to accomplish it.

I’m not telling you that it’s not possible, but I’m telling you that you can just accomplish this with in-engine APIs. I’m also asking what your use case is and why you need HttpService for this when you can accomplish this with API that’s already available to you.

Its not that I am trying to find a simple way of getting this done. I’m trying to increase my knowledge of the http service. and I’m also using this for a info checking Ui.

What does their number of friends or followers have to do with a join date? Syntax’s solution was fine.

2 Likes

True, sorry, I thought the problem was not being able to use http service, so I just gave an example.

BTW, I cant find the AccountAge on the docu

https://api.roblox.com/docs?useConsolidatedPage=true

I see, you’re attempting if it is possible through an HttpRequest. The answer is really, most of these APIs needs a proxy, that’s about it.

Your best bet if you do need to get account age is to just get it from the Player.AccountAge
If you need to, for some reason, get player friends, Players:GetFriendsAsync (roblox.com)

That’s a really pointless use case but okay. I can understand if it’s just for learning value but in production work you shouldn’t be using more complex methods if simpler ones exist.

Someone linked the API you need earlier, /v1/users/{userId}. Send a GET request to this endpoint with the target’s UserId and JSONDecode the response if the GET request succeeds. The date you need is in the created key of the dictionary you’ll get back, but it’s in ISO 8601 format. Use DateTime.fromIsoDate to convert the given string into a DateTime object if you need to further work with the account creation date. Make sure to use ToLocalTime or ToUniversalTime if you need a dictionary containing information about the date: the constructor simply provides the date in milliseconds.

As a side recommendation, use RequestAsync over GetAsync when you make the request. Gives you more options than GetAsync, it’s now the canonical way to send requests with HttpService and you can also work in greater detail with the response that it gives back (e.g. you actually get a response code).

local HttpService = game:GetService("HttpService")

local ENDPOINT = "https://users.rprxy.xyz/v1/users/%d"

local success, response = pcall(function ()
    return HttpService:RequestAsync({
        ["Url"] = ENDPOINT:format("6809102"), -- My UID
        ["Method"] = "GET"
    })
end)

if success and response and response.Success == true then
    local accountDetails = HttpService:JSONDecode(response.Body)
    local createdISO = accountDetails.created
    local createdDate = DateTime.fromIsoDate(createdISO):ToUniversalTime()

    print(createdDate.Day, createdDate.Month, createdDate.Year) -- 28 2 2010
end
3 Likes

The thing is im trying to get peoples account ages that aren’t in the game, since im making a info gui for anyones name u put in. is that possible with account age?

1 Like

This is a much more fair and legitimate use case for involving HttpService. AccountAge is a property of the Player and therefore requires them to be in the server. Refer to my post above for how to get a player’s account creation date with HttpService.

2 Likes

Please create a new thread for a new problem and describe your circumstances there along with any code or details that would allow others to better help you. If you’re having trouble using my code and it’s not a different problem altogether (modifying the code would be considered a different problem), then I need details as well. I can’t help you if you don’t give me any details to work off of.