GET

Get Current User

/users/@me

Returns the current authenticated user.

Authentication

Auth TypeOauth
Scopesidentify
Rate LimitDefault

Parameters

Authorization header string ยท required

Bearer access token.

Code Examples

curl -X GET "https://hammity.app/api/v1/users/@me" 
  -H "Authorization: Bearer YOUR_TOKEN"
const response = await fetch("https://hammity.app/api/v1/users/@me", {
  headers: {
    Authorization: `Bearer ${token}`
  }
});

const user = await response.json();
$ch = curl_init("https://hammity.app/api/v1/users/@me");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer " . $token],
]);

$user = json_decode(curl_exec($ch), true);

Schemas

Request

{}

Response

{
  "id": "string",
  "username": "string",
  "display_name": "string",
  "avatar": "string|null"
}

Try It

Response will appear here.