Unable to find a working API

I’ve been trying to make a player lookup mostly for fun and I’ve managed to find API’S for the majority of the stuff I’ve needed, I just can’t seem to find a API for getting the Join Date, Followers and Following.

I’ve looked within the Developer Forum but the search bar seems to be bringing posts up which isn’t related at all.

I’m just here to look for suggestions on things to try or where I might be able to find an API.

I don’t think there is any way to get a players followers or following, but you can calculate the players join date by using the player property “AccountAge”, using tick() or os.time(), dividing that by seconds in a day (86400), subtracting the players AccountAge, then multiplying it by seconds in a day, and formatting it using os.date().

local time = os.time() --1703389939

local joinTime = (math.floor(time / 86400) - player.AccountAge) * 86400 -- assume player.AccountAge = 783

local date = os.date(“%c”, joinTime) --> Mon Nov  1 05:30:00 2021
--This isnt what the format will actually look like, but is what lua 5.3 will give you.

Edit: This won’t give you a precise time, only the day when they joined.

1 Like

I did stumble upon something like this when searching the Developer Forum but I think the player needs to be in game for this to work. I had found a few API’S for them but no matter what I did Roblox did not seem to want to accept it.

1 Like

Are you trying to do it from a Roblox server, or from an external location (e.g. Hosted on your computer)

Roblox Server.

no Characters Five

Then you aren’t going to be access the required APIs to do what you want, without making use of a proxy. There are a few proxy’s around - they should be easy enough to locate

I don’t really use API’S so are you able to explain in baby terms? When I looked around I did find:

https://friends.roblox.com/v1/users/156/followings/count

I would switch “156” with the desired user id (Which I can get just fine) but whenever I tried to use this one it would always say “HttpService is not allowed to access ROBLOX resources” which when I had another look around people were saying it was due to the “roblox.com” part of it and I should switch it to some ro something but that didn’t work aswell

Proxy’s act as a middle man, so your request goes

You -> Proxy -> Roblox 

instead of

You -> Roblox

This is required because Roblox doesn’t let you directly access their APIs from game servers

1 Like

I tried this thing called roproxy as that was what people were recommending but when I tried that It just kept saying HTTP 405 (Method Not Allowed). I’m not sure if I did the right thing so It could’ve been that?

Edit: I’m just going to try change the code which sends it and see if that helps as to be honest the script is held together by hopes and prayers.

Edit 2: It was because it was held together by hopes and prayers, I fixed some in-perfections and it worked. Well this and because of the proxy

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