Press "Enter" to skip to content

[PHP]Mojang Authentication

Url: https://authserver.mojang.com/authenticate

Method : POST

Request:

{

"agent": {

"name": "Minecraft",

"version": 1


},

"username": "[email protected]",

"password": "yourPassword",

"clientToken": "client identifier"

}

註: clientToken可以隨意輸入 , 如果驗證成功 , 會返回相同的clientToken

例外情況:

error password:

{

"error":"ForbiddenOperationException",

"errorMessage": "Invalid credentials.Invalid username or password."

}


request too many:

{

"error":"ForbiddenOperationException",

"errorMessage":"Invalid credentials."

}

PHP Code:

Comments