Sloxly Docs
OAuth Captcha Console

User Info Endpoint

Fetch the authenticated user's profile using the access token.

Request

HTTP
GET https://api.sloxly.com/v1/Oauth/userinfo
Authorization: Bearer ACCESS_TOKEN

Response

JSON — Success (200)
{
    "status": "success",
    "user": {
        "id": 42,
        "username": "johndoe",
        "email": "john@example.com",
        "first_name": "John",
        "last_name": "Doe",
        "avatar": "https://assets.sloxly.com/avatars/42.jpg"
    }
}

PHP Example

PHP
$ch = curl_init("https://api.sloxly.com/v1/Oauth/userinfo");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ["Authorization: Bearer $accessToken"],
]);
$user = json_decode(curl_exec($ch), true);
echo "Welcome, " . $user['user']['first_name'];

Response Fields

FieldTypeDescription
idintegerUnique user ID
usernamestringUsername
emailstringEmail address
first_namestringFirst name
last_namestringLast name
avatarstring|nullAvatar URL
← PreviousToken Exchange