-
Bug
-
Resolution: Invalid
-
Normal
-
None
-
None
Documentation of API
It can be found here: http://wiki.vg/index.php?title=Mojang_API&oldid=13450#User_Info
Status
This API is not working anymore. What happens when I make a quarry, is it returns "HTTP ErrorĀ 401 Unauthorized".
Example Implementation of API
The following code was working fine (was returning info about the account) about half a year ago.
<?php $token = "Put a Session ID / token here."; $header = array( 'http'=>array( 'method'=>"GET", 'header'=>"Authorization: Bearer ".$token )); $context = stream_context_create($header); $result = file_get_contents('https://api.mojang.com/user', false, $context); echo $result; ?>