Skip to content

Authentication

mircokroon edited this page Aug 27, 2023 · 10 revisions

In most cases, authentication should happen automatically. The downloader application looks for the running Minecraft game process to extract the access token from it's starting parameters.

If authentication does not work for any reason, you need to enter your authentication details manually.

Manual authentication

When running the application directly, navigate to the Authentication tab in the settings GUI. Here you can enter your Minecraft username and your access token.

If you're running the application from a commandline, you can use the -u [USERNAME] and -t [ACCESS TOKEN] arguments instead.

Access token

The access token is needed to authenticate with Mojang. It changes frequently and cannot be used to gain permanent access to your account. Getting the token depends largely on your OS. Following the below instructions should work on most systems, although it requires the use of a commandline or terminal.

Getting the access token

  1. Ensure Minecraft is running.
  2. Open a terminal or commandline. For windows, this can be done by searching for PowerShell in the start menu and pressing enter.
  3. Type one of the following, followed by pressing enter, to find all Java processes running:
    • For Windows: Get-CimInstance -Query 'SELECT CommandLine FROM Win32_Process WHERE Name LIKE "%Java%" AND CommandLine LIKE "%accessToken%"' | Select-Object -Property CommandLine | Out-String -width 99999
    • For Linux: ps -fC java
    • For Mac: ps ax | grep "java"
  4. Copy the output. Usually this is done by drag-selecting it and right-clicking the selection.
  5. Paste the contents in a text editor (e.g. Notepad)
  6. Search for "accessToken" in the contents, and copy the long string of text immediately after it. It may span multiple lines of text as it is generally hundreds of characters long.

Third-party launchers

Some third-party launchers use a different method of passing the authentication details to Minecraft, you may have to use the default launcher to ensure that the authentication details can be retrieved.

Old instructions

If you are using a third party launcher or an older version of the launcher, you may be able to use the older and simpler instructions here:

Instructions for older launchers and third-party launchers

Standard launcher

For the standard launcher, the access token can be found in .minecraft\launcher_accounts.json. An example of this file and where to find your access token can be seen below. When there are multiple accounts, look for the matching username not far below the token.

{
  "accounts" : {
    active_account : {
      "accessToken" : your_access_token_here,
      "minecraftProfile" : {
        "id" : "...",
        "name" : matching_username
      },
      "...": "..."
    }
  },
  "activeAccountLocalId" : active_account ,
  "mojangClientToken" : "..."
}

MultiMC

When using MultiMC, the token will be stored in a file called accounts.json in the installation directory of MultiMC. The structure of this file is very similar to the default launcher's launcher_accounts.json.

Clone this wiki locally