Get a user

Contents

    Get a single user's public profile by username. Sensitive fields (email, role, password hash, authentication token) are not returned.

    Requires the API Token. See Authentication.

    HTTP Request

    GET /api/users/{username}

    Parameters

    Key Type Description
    token (required) string API Token.

    Response

    HTTP Code: 200
    Content-Type: application/json
    Body:
    {
      "status": "0",
      "message": "User profile.",
      "data": {
        "username": "admin",
        "firstName": "",
        "lastName": "",
        "nickname": "",
        "description": "",
        "twitter": "",
        "facebook": "",
        "codepen": "",
        "instagram": "",
        "github": "",
        "gitlab": "",
        "linkedin": "",
        "xing": "",
        "telegram": "",
        "mastodon": "",
        "vk": "",
        "youtube": "",
        "bluesky": "",
        "profilePicture": ""
      }
    }

    Errors

    Code Reason
    404 No user exists with the given username.

    CURL command example

    $ curl -X GET "https://www.example.com/api/users/admin?token=<api-token>"