Update Own Basic Information
    • Dark
      Light
    • PDF

    Update Own Basic Information

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/users.updateOwnBasicInfo
    • To change your email or password, you must confirm it using TOTP. If you don't have 2FA enabled (token code or email), TOTP will require the current password method.
    • If you add the currentPassword encrypted in SHA256 to the request body, the request won't require TOTP again.

    Changelog

    VersionDescription
    6.4.0Add bio and statusType parameters.
    0.62.2Added
    Header parameters
    X-User-Id
    stringRequired

    The authenticated user ID.

    ExamplerbAXPnMktTFbNpwtJ
    X-Auth-Token
    stringRequired

    The authenticated user token.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    x-2fa-code
    stringRequired
    Example148750
    x-2fa-method
    stringRequired

    The desired method to get the 2FA code. It can be email, totp, or password.

    Body parameters
    Expand All
    object
    data
    object Required

    An object of user data to be updated with the following parameters.

    email
    string

    Email ID of the user.

    newPassword
    string

    The new password of the user.

    Examplepassw0rd
    currentPassword
    string

    The password for the user encrypted in SHA256.

    Example5994471abb01112afcc18159f6cc74b4f511b99806da59b3caf5a9c173cacfc5
    nickname
    string

    The nickname of the user.

    Examplecake
    bio
    string

    The bio of the user.

    ExampleEngineer
    username
    string

    The username of the user.

    Exampleexample
    name
    string

    Name of the user.

    ExampleExample User
    statusType
    string

    The status type of the user. It can be online, busy, away, or offline.

    Exampleoffline
    statusText
    string

    The status text of the user.

    ExampleOn a vacation
    customFields
    object

    Any custom fields the user should have on their account. You must define the custom fields in the workspace settings.

    Responses
    200

    OK

    Success Example
    {
      "user": {
        "_id": "rbAXPnMktTFbNpwtJ",
        "createdAt": "2023-02-20T13:42:07.119Z",
        "services": {
          "password": {
            "bcrypt": "$2b$10$E9ppW3T2itbMEcDvOdWBR.NXiW3YbifRHwBhjVkt26r1XS8yNhh6u"
          },
          "email2fa": {
            "enabled": true,
            "changedAt": "2023-02-20T13:42:07.118Z"
          },
          "resume": {
            "loginTokens": [
              {
                "when": "2023-09-16T09:27:10.959Z",
                "hashedToken": "A1jmsVCHHH2SkXHrEJDfumN+VtUP3tcuJ/OGseGrRbA=",
                "twoFactorAuthorizedHash": "3067196228a830eacd6181a6977fe86a",
                "twoFactorAuthorizedUntil": "2023-09-19T16:40:58.767Z"
              },
              {
                "when": "2023-09-18T10:37:58.218Z",
                "hashedToken": "RLdxvu9dDnk6QRwFdaK3my1AoPeGaR5lTkK+zEhTuPk="
              },
              {
                "when": "2023-09-18T10:41:25.814Z",
                "hashedToken": "zWZ8wW9PNlVuI2Q65vK/9vytaONk1BXxaWcNld4qvEc="
              }
            ]
          },
          "email": {
            "verificationTokens": [
              {
                "token": "lHq_4L8Orgxu2p5NhfVb0V9kA7kO1VaBXA5GmaJiuX3",
                "address": "[email protected]",
                "when": "2023-05-23T18:47:07.142Z"
              }
            ]
          },
          "totp": {
            "enabled": false
          },
          "passwordHistory": [
            "$2b$10$n1.FV8S2mxz7GzXA392V5OaDa5X0WR1DQ4eGGFKI/wpdhS9sVIC6S",
            "$2b$10$4I68O5mlR.C8dRhtZ4Mj6us6EMwRHNIUqEWQe/nOhISs4e8RtOliW",
            "$2b$10$AU9Ncfd8bO5TpE.5iLMjyujdd6RVJaoeKckVqo3MMO9Ngc3oyMAs2"
          ]
        },
        "username": "roxie",
        "emails": [
          {
            "address": "[email protected]",
            "verified": true
          }
        ],
        "type": "user",
        "status": "offline",
        "active": true,
        "_updatedAt": "2023-09-19T16:10:58.873Z",
        "__rooms": [
          "GENERAL",
          "siyr2oWQJBjQjhLwr",
          "6GFJ3tbmHiyHbahmC",
          "64f0f82c2c26843a68c1f7ba"
        ],
        "roles": [
          "user",
          "admin",
          "livechat-agent",
          "livechat-manager"
        ],
        "name": "test test",
        "settings": {
          "preferences": {
            "themeAppearence": "light"
          },
          "profile": {}
        },
        "lastLogin": "2023-09-19T16:00:19.657Z",
        "statusConnection": "away",
        "utcOffset": 1,
        "banners": {
          "versionUpdate-6_0_0": {
            "id": "versionUpdate-6_0_0",
            "priority": 10,
            "title": "Update_your_RocketChat",
            "text": "New_version_available_(s)",
            "textArguments": [
              "6.0.0"
            ],
            "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/6.0.0",
            "modifiers": [],
            "read": true
          },
          "versionUpdate-6_2_8": {
            "id": "versionUpdate-6_2_8",
            "priority": 10,
            "title": "Update_your_RocketChat",
            "text": "New_version_available_(s)",
            "textArguments": [
              "6.2.8"
            ],
            "link": "https://github.com/RocketChat/Rocket.Chat/releases/tag/6.2.8",
            "modifiers": []
          }
        },
        "statusDefault": "offline",
        "statusText": "On a vacation",
        "operator": true,
        "livechatStatusSystemModified": false,
        "statusLivechat": "available",
        "livechatCount": 8,
        "livechat": {
          "maxNumberSimultaneousChat": ""
        },
        "bio": "Engineer",
        "nickname": ""
      },
      "success": true
    }
    Expand All
    object
    user
    object
    _id
    string
    createdAt
    string
    services
    object
    password
    object
    bcrypt
    string
    email2fa
    object
    enabled
    boolean
    changedAt
    string
    resume
    object
    loginTokens
    Array of object
    object
    when
    string
    hashedToken
    string
    twoFactorAuthorizedHash
    string
    twoFactorAuthorizedUntil
    string
    email
    object
    verificationTokens
    Array of object
    object
    token
    string
    address
    string
    when
    string
    totp
    object
    enabled
    boolean
    passwordHistory
    Array of string
    string
    username
    string
    emails
    Array of object
    object
    address
    string
    verified
    boolean
    type
    string
    status
    string
    active
    boolean
    _updatedAt
    string
    __rooms
    Array of string
    string
    roles
    Array of string
    string
    name
    string
    settings
    object
    preferences
    object
    themeAppearence
    string
    profile
    object
    lastLogin
    string
    statusConnection
    string
    utcOffset
    integer
    banners
    object
    versionUpdate-6_0_0
    object
    id
    string
    priority
    integer
    title
    string
    text
    string
    textArguments
    Array of string
    string
    link
    string
    modifiers
    Array of object
    object
    read
    boolean
    versionUpdate-6_2_8
    object
    id
    string
    priority
    integer
    title
    string
    text
    string
    textArguments
    Array of string
    string
    link
    string
    modifiers
    Array of object
    object
    statusDefault
    string
    statusText
    string
    operator
    boolean
    livechatStatusSystemModified
    boolean
    statusLivechat
    string
    livechatCount
    integer
    livechat
    object
    maxNumberSimultaneousChat
    string
    bio
    string
    nickname
    string
    success
    boolean
    401

    Unauthorized

    Authorization Error
    {
      "status": "error",
      "message": "You must be logged in to do this."
    }
    object
    status
    string
    message
    string

    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.