Get Avatars
    • Dark
      Light
    • PDF

    Get Avatars

    • Dark
      Light
    • PDF

    Article summary

    Get
    /api/v1/avatar/{subject}

    Note:

    • This is a RESTful endpoint that sits separately from the REST API in the server codebase and behaves slightly differently.
    • The rc_uid and rc_token can alternately be provided as cookies (already present in the web interface), but not as auth headers.
    • When requesting the avatar of a user, if they have a custom avatar set, this will override the user's choices of format or size.
    • If no uploaded avatar exists for a user, a default one will be generated for them based on the initial of their username in a randomly colored square.
    • If UI_Use_Name_Avatar is set and the user has a real name set, the generated avatar will be based on their actual name instead of the username.
    • If no format is requested, or the format requested isn't supported, the format returned will be SVG.
    Path parameters
    subject
    stringRequired

    Name of the user or channel. Channels are always preceded by an @ symbol. Rooms that are DMs are always represented by the other participant's user avatar.

    Examplealice, @general
    Query parameters
    format
    string

    Format of the image requested. The values can be one of: jpg, jpeg, png.

    Examplepng
    size
    integer

    Width and height of the image. Default: 200

    Example50
    rc_uid
    string

    User ID for authenticating is only required if Accounts_AvatarBlockUnauthenticatedAccess is enabled.

    ExampleaobEdbYhXfu5hkeqG
    rc_token
    string

    User auth token for authenticating is only required if Accounts_AvatarBlockUnauthenticatedAccess is enabled.

    Example9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq
    Responses
    200

    OK

    string (binary)

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.