Skip to content

Instantly share code, notes, and snippets.

@jomo
Last active April 16, 2024 21:57
Show Gist options
  • Star 34 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save jomo/be7dbb5228187edbb993 to your computer and use it in GitHub Desktop.
Save jomo/be7dbb5228187edbb993 to your computer and use it in GitHub Desktop.
Tracking down Minecraft account creation

Tracks down when a Minecraft account was created.

How it works

Mojang has an API endpoint for usernames:

https://api.mojang.com/users/profiles/minecraft/<name>?at=<timestamp>

It can be used to find the UUID of an account, by username it used at the given time.
It returns either 200 OK or 204 No Content – indicating that the username was not in use at the time.

That means we can find out whether an account existed at a specific time.
We always look at a range of time, starting with Jan 2010 - now.
The range is then split in half, and a request is made for the intermediate time.
200 means the account already existed, thus created in the first half; 204 means the account did not yet exist, thus created in the second half.
This step is repeated with the respective time range until the exact second is found.
See also: Babylonian Method

Currently it needs about 27 requests to find the creation date.

Caveats

This works with nodejs, however it's not a proper module and the track function doesn't have a callback.

Due to Mojang being Mojang, the API endpoint is horribly broken:

  • It does not work with legacy accounts
  • It does not work with accounts that have been renamed
    • Except sometimes™
    • The result may be inaccurate though

Example usage

The arrow indicates in which half of the time range the account was created.

> track("dinnerbone")

range: 1263146630	<-|  	1453566749
range: 1263146630	<-|  	1358356689
range: 1263146630	<-|  	1310751659
range: 1263146630	  |->	1286949144
range: 1275047888	  |->	1286949144
range: 1280998517	  |->	1286949144
range: 1283973831	<-|  	1286949144
range: 1283973831	  |->	1285461487
range: 1284717660	  |->	1285461487
range: 1285089574	  |->	1285461487
range: 1285275531	  |->	1285461487
range: 1285368510	  |->	1285461487
range: 1285414999	<-|  	1285461487
range: 1285414999	  |->	1285438243
range: 1285426622	<-|  	1285438243
range: 1285426622	<-|  	1285432432
range: 1285426622	  |->	1285429527
range: 1285428075	<-|  	1285429527
range: 1285428075	  |->	1285428801
range: 1285428439	  |->	1285428801
range: 1285428621	<-|  	1285428801
range: 1285428621	  |->	1285428711
range: 1285428667	  |->	1285428711
range: 1285428690	  |->	1285428711
range: 1285428701	  |->	1285428711
range: 1285428707	<-|  	1285428711
range: 1285428707	<-|  	1285428709
range: 1285428707	<-|  	1285428708
found: Sat, 25 Sep 2010 15:31:47 GMT
function check(name, num, callback) {
https.get("https://api.mojang.com/users/profiles/minecraft/" + name + "?at=" + num, function(resp) {
callback(resp.statusCode === 200);
});
};
function track(name, a, b, lastfail) {
a = a || 1263146630; // notch sign-up
b = b || Math.floor(Date.now()/1000);
lastfail = lastfail || 0;
if(a === b) {
check(name, a, function(ok) {
if (ok && lastfail === a-1) {
console.log("found:", new Date(a*1000).toUTCString());
} else {
if (lastfail === 0) {
console.log("target is <= " + a);
} else {
console.log("target is > " + a);
}
}
});
} else {
var mid = a + Math.floor((b-a)/2);
check(name, mid, function(ok) {
if (ok) {
console.log("range: " + a + "\t<-| \t" + b);
track(name, a, mid, lastfail);
} else {
console.log("range: " + a + "\t |->\t" + b);
track(name, mid+1, b, mid);
}
});
}
}
@TheSast
Copy link

TheSast commented Sep 27, 2022

Can someone check the account 'groudonthvo' ?
(it is a pre-2014 account)

@rssasv
Copy link

rssasv commented Nov 9, 2022

@sickflyer999 2016-08-30

can someone check the account "rssasv" and it is not migrated to a microsoft account.

@rssasv
Copy link

rssasv commented Nov 9, 2022

@nimbus321
Copy link

@rssasv 2021-02-02

@Curvezy
Copy link

Curvezy commented Nov 27, 2022

hey can someone check "v1ghost" for me im a little dumb tryna get this to work

@nimbus321
Copy link

@Curvezy bad news for you, it says null, sorry

@Curvezy
Copy link

Curvezy commented Nov 27, 2022

@Curvezy bad news for you, it says null, sorry
Thank you for trying

@ItsJustSpino
Copy link

Yo, I don't wanna be that guy but can someone please check SpinoDinoMan

@nimbus321
Copy link

@ItsJustSpino sorry man, another null

@ItsJustSpino
Copy link

@nimbus321 Thanks man I really appreciate you trying it.

@lbkh
Copy link

lbkh commented Jan 14, 2023

hi, idk if this is still possible due the the migration thing but i was wondering if someone could check the name 'loubylili' (or 'bee_atrice', if it needs to be an updated name) it's not migrated and i no longer have access to the bank transactions to find out the account age this way

@nimbus321
Copy link

@lbkh bee_atrice 2013-11-23

@LEANUNAI
Copy link

Hi I have a legacy account under user name "jmb" anyway to try and find its date Thanks

@LEANUNAI
Copy link

not migrated

@nimbus321
Copy link

@BakuCool and @LEANUNAI sorry, it says null

@glee75
Copy link

glee75 commented Feb 27, 2023

Hi, could I get a check on "Rangii"? Please and thank you!

@nimbus321
Copy link

@glee75 sorry, another null :(

@tarnishedsnack
Copy link

Anyone willing to check EpicMakayla12? Not migrated, haven’t had access in years :o

@Official-CalcOS
Copy link

Anyone willing to check EpicMakayla12? Not migrated, haven’t had access in years :o

Created at null

@Official-CalcOS
Copy link

It's null, so sorry

@Official-CalcOS
Copy link

Sorry it's null

@tarnishedsnack
Copy link

Thanks for checking!

@mtm-209
Copy link

mtm-209 commented Mar 9, 2023

Does this work for accounts that have changed usernames? If so can someone check YeetJuice, if not can they check Masonary456
Nevermind read the caveats lol

@nbmusic098
Copy link

nbmusic098 commented Mar 13, 2023

hey ! i went and gave running the track.js file a shot, and everytime i run the .load track.js line in either terminal or powershell (cmd wouldn't work) in windows or macos , the first line of code for track.js repeats infinitely until i quit the program, not sure what's happening.

@Unpredictableiscool
Copy link

how do i run dis

@mtndewv
Copy link

mtndewv commented Mar 15, 2023

I feel it is worth mentioning for those newly discovering this thread but the original code no longer works as intended for several reasons. The most prominent being fairly recent massive changes to the API and the possible discontinuation of the current API version. Also as I mentioned in an earlier post some time before the most recent account migration, several changes were made to the API, the method that the original program used to narrow the date to a very specific time broke as those values no longer exist. so the original program no longer works to any degree. Again for some accounts simply going to the web directory https://api.ashcon.app/mojang/v2/user/ and putting in your username or the desired username after the last / gives you the creation date. This is essentially what the original and various other programs made by other users is doing to determine the creation date but is limited to just the day of creation not the time. Also since exact times can no longer be determined, creating or using a program to check account age is redundant. Simply put the URL into your search bar, put the username in and hit enter. The date created will show up towards the bottom of the page of text and if the value is Null, No value, etc it could be due to a number of reasons. The account may not have been migrated at some point, not migrated "properly", made after or before certain dates (usually associated with changes to the API made by Mojang.), changes to the original username over time, and so many other things it can be difficult to say for sure why any given account returns a Null or other than normal value. It is also very important to note that even if an account does return a date that date may be incorrect. I can not say for sure prior to the last major migration/API changes but as of the current state of the API some account ages are incorrect or inaccurate due to reasons such as: the value changing after previous migration/API changes to the date the account was migrated, the API mistaking a new user for an old user or username that no longer owns a valid account so the value is overwritten with the date of that original user/username, or the value can just be flat out wrong due to odd inaccuracies in the way Mojang's API works. My account still works surprisingly but rarely can I find any accounts anymore that still return accurate dates or any dates at all, likely as they will possibly be removing it entirely some time soon. If you didnt start playing around 2010-2013, odds are that you get Null or something similar and even old players are not guaranteed to work or even be correct. As of or around Nov 4, 2020 the functionality and accuracy of determining a minecraft accounts age has essentially become impossible without directly contacting mojang and requesting the information which they are not very likely to give due to "security concerns". If things still don't make sense I suppose look at the previous comments or read this one again as I'm pretty sure the OP has either abandoned this project, their account, or moved onto other things entirely so ating OP's username is pointless. Mojang nor OP support this feature any longer so really it's just up to us to search the API manually via URL. And if copying and pasting a URL into your search bar is really more work than typing out the username and a comment asking someone to search it for you, then you are truly beyond help.

@wtfEttore
Copy link

wtfEttore commented Aug 5, 2023

pls someone check "sickiss" isnt migrated, @mtndewv @old-mibmo

@wtfEttore
Copy link

@Official-CalcOS pls check my username "sickiss"
i cant run program

@sizquirt
Copy link

sizquirt commented Aug 6, 2023

Mojang accounts are being deprecated in the next following months, refrain from replying to this thread as it is no longer possible to find join dates.

@mtndewv
Copy link

mtndewv commented Aug 6, 2023

@Official-CalcOS pls check my username "sickiss" i cant run program

Literally all you had to do is type https://api.ashcon.app/mojang/v2/user/sickiss into your web browser and you'd get as much info as anyone else can get atm. As sizquirt said, mojang accounts dying soon and this thread will be totally useless. Regardless you nd the 100 other people should read comments more carefully before ating someone. no program is required. Says "sickiss" is null, that's all the info your gonna get. Id guess since you said its not migrated thats why, or its just a newer account so no original mojang account would exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment