Skip to content

Instantly share code, notes, and snippets.

@jomo
Last active October 30, 2024 01:49
Show Gist options
  • 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);
}
});
}
}
@nimbus321
Copy link

@glee75 sorry, another null :(

hi can you check " TechwizardDK" ?

sorry, another null

@Glynnshed2012
Copy link

@glee75 sorry, another null :(

hi can you check " TechwizardDK" ?

sorry, another null

Hello, could you try Glynnshed? If that doesn't work try either Lyndhurst2016 or Glynnshed2012.

@nimbus321
Copy link

@glee75 sorry, another null :(

hi can you check " TechwizardDK" ?

sorry, another null

Hello, could you try Glynnshed? If that doesn't work try either Lyndhurst2016 or Glynnshed2012.

Glynnshed2012 was created at 2020-10-01

@nimbus321
Copy link

LISTEN!!

For anyone that is new to this post, just open https://api.ashcon.app/mojang/v2/user/YOUNICKHERE
You don't need anything else.

@P3nguinMinecraft
Copy link

P3nguinMinecraft commented Sep 24, 2024

LISTEN!!

For anyone that is new to this post, just open https://api.ashcon.app/mojang/v2/user/YOUNICKHERE You don't need anything else.

what does it mean if the creation history is null

oh i backread and it seems like most accounts cant find creation date because of api and migration

@Srelock
Copy link

Srelock commented Oct 22, 2024

This is what i got from running the script.
range: 1263146630 <-| 1263146633
range: 1263146630 <-| 1263146631
target is <= 1263146630
PS C:\Windows\system32>
i tried the web lint it says 2020 i have screenshots from 2019

@mtndewv
Copy link

mtndewv commented Oct 30, 2024

For anyone just joining us or actually reading the comments (thank you to those who have done so)
A seemingly new method has been found to determine a more exact account creation date using the inspect element/dev tool in chrome on Minecraft.net in order to find your own account creation date. (i've tested it myself and since I've already determined the exact time prior to the API changes using the original script for my own account, I can confirm the date/time matches with the new method.)

One catch being that you must be able to log into your account on minecraft.net, and therefore you can only check the creation date/time for your own account, not that of others. If you are looking to determine the account age for someone else, they will have to do so themselves, This is due to the requirement of needing the access token associated with that account. For obvious security reasons only the owner of the account should have access to this.

Instructions for the new method:
Go to minecraft.net.
Log in to your Microsoft account.
Go to your profile page.
Click on Profile Name under Minecraft: Java Edition.
Open Inspect Element (press Ctrl + Shift + I on Windows or Command + Option + I on Mac).
Navigate to the Network tab.
Refresh the Minecraft webpage.
In the filter box (usually at the top-left of the Network tab), type namechange.
Click on "namechange" from the list below.
In the right panel, click on Preview or Response.
Look for "createdAt"; that is your account creation date/time.
(e.g., "createdAt": "2012-04-30T00:00:00Z").

If that's still unclear search something like "How to see when you've created your minecraft account" on Youtube.

While Id love to create a basic program that simply asks you to log into your Microsoft/Minecraft account and tells you the date, I severely lack the coding experience. If any one else would like to do so instead it doesn't seem like too difficult of a task and we could finally get people to stop asking others to do searches for them.

Mine on, Gamers.

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