{"id":18766313,"url":"https://github.com/navarr/minecraftapi","last_synced_at":"2025-12-08T23:30:17.394Z","repository":{"id":9450361,"uuid":"11329310","full_name":"navarr/MinecraftAPI","owner":"navarr","description":"An API for validating a user against Mojang's servers written in PHP","archived":false,"fork":false,"pushed_at":"2016-11-16T18:24:20.000Z","size":139,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T06:22:14.531Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/navarr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-11T01:21:06.000Z","updated_at":"2014-09-21T18:02:29.000Z","dependencies_parsed_at":"2022-09-02T12:42:53.746Z","dependency_job_id":null,"html_url":"https://github.com/navarr/MinecraftAPI","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navarr%2FMinecraftAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navarr%2FMinecraftAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navarr%2FMinecraftAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navarr%2FMinecraftAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/navarr","download_url":"https://codeload.github.com/navarr/MinecraftAPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239669056,"owners_count":19677662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T18:40:11.630Z","updated_at":"2025-12-08T23:30:17.344Z","avatar_url":"https://github.com/navarr.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"MinecraftAPI\n============\n\nAn API for validating a user against Mojang's servers written in PHP\n\n## Installation\n\nAssuming you have [composer](http://www.getcomposer.org/),\n\n`php composer.phar require navarr/minecraft-api:2.*`\n\n## How to use\n\nUsing the MinecraftAPI is incredibly easy in PHP.  Assuming that you have it installed via composer,\n\n```php\n\u003c?php\n    // composer autoload call\n    \n    use Navarr\\MinecraftAPI\\MinecraftAPI;\n    use Navarr\\MinecraftAPI\\Exception\\BadLoginException;\n    use Navarr\\MinecraftAPI\\Exception\\MigrationException;\n    use Navarr\\MinecraftAPI\\Exception\\BasicException;\n    \n    try {\n        $minecraftApi = new MinecraftAPI($username, $password);\n    } catch (BadLoginException $e) {\n        // Invalid Credentials\n    } catch (MigrationException $e) {\n        // User tried to login with their minecraft name instead of their mojang account handle (and have migrated)\n    } catch (BasicException $e) {\n        // The account is a \"basic\" Minecraft account.  They have not purchased Minecraft.\n    }\n    \n    $minecraftName = $minecraftApi-\u003eusername;\n    $accessToken = $minecraftApi-\u003eaccessToken;\n    $uuid = $minecraftApi-\u003eminecraftID;\n```\n\n## License\n\nMIT License (coming soon!)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavarr%2Fminecraftapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnavarr%2Fminecraftapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavarr%2Fminecraftapi/lists"}