API Documentation: User API

To use the user API, send a GET request to https://mateishome.page/api/getMHPUser.php.

Usage

There is one required paramater and one optional parameter: id and type respectively. You must set the value of ID to the ID of the user you want to get information on. The value of type can be set to either nothing, plaintext or json. If type is set to nothing or json, it will return information on the user in JSON format. If it is set to plaintext, then it will return information on the user in format key1:value1;key2:value2;.

Returned Fields

It will return the following fields: id, username, date_created, admin, special, shortbio, bigdescription, pfp, website, and pfp_url.
id: The ID of the user.
username: The username of the user.
date_created: The date the user signed up.
admin: Whether the user is an admin or not (will return 1 or null).
special: The user's badges (I haven't coded this yet but it's coming soon™).
shortbio: The user's custom status.
bigdescription: The user's description.
pfp: The user's profile picture ID.
website: The user's website (I haven't coded this yet but it's coming soon™).
pfp_url: The URL of the user's profile picture.

Examples

All examples are written in the best language ever, PHP.

// Method 1: Get information on a user formatted in JSON.
$matei = json_decode(file_get_contents("https://mateishome.page/api/getMHPUser.php?id=1"));
echo $matei->username . '\'s profile picture is located at ' . $matei->pfp_url; // Will return something like `admin's profile picture is located at https://assetdelivery.roblox.com/v1/asset/?id=17512542782`

// Method 2: Get information on a user in plaintext
$matei = file_get_contents("https://mateishome.page/api/getMHPUser.php?id=1&type=plaintext");
echo $matei; // Will return something like username:admin;id:1;admin:1;date_created:2024-03-10 11:05:42;...
//but why would you ever want to do it like this