Skip to content

Instantly share code, notes, and snippets.

@caseyavila
Created December 26, 2021 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caseyavila/58166e518365e2a141567c29383b42f4 to your computer and use it in GitHub Desktop.
Save caseyavila/58166e518365e2a141567c29383b42f4 to your computer and use it in GitHub Desktop.
Simple Minecraft login script for Mojang accounts
#!/usr/bin/env python3
import requests
login_url = "https://authserver.mojang.com/authenticate"
payload = {
"agent": {
"name": "Minecraft",
"version": 1
},
"username": "EMAIL HERE (OR USERNAME FOR UNMIGRATED ACCOUNTS)",
"password": "PASSWORD HERE",
"clientToken": "",
"requestUser": True
}
request = requests.post(login_url, json=payload)
print(request.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment