passwordReset — Changing or resetting user passwords

The passwordReset request can be used to change or reset a user’s password.

The API endpoint is:

https://api.sitelock.com/v1/partner

Request format

  • SiteLockOnlineRequest: This element is used to delineate the full API request.

    • authentication: The partner’s username, password, and branding

      • username: The partner’s API username

      • password: The partner’s API password

      • partner: (Optional) The brand name to use in messaging

    • passwordReset: The method name

      • user: The login ID of the user whose password is being reset (this value may have been provided at the time of provisioning). If a login ID wasn’t explicitly provided, it would be the same as the email address.

      • account_id: The account ID of the user whose password is being reset.

        • If no login ID (user element) is provided in the request, the account administrator’s password will be reset.

      • If an account has multiple users, pass a specific user’s login ID (the user element). If the login ID is passed, the account_id element becomes optional.

      • pass: (Optional) If specified, the password is changed to the provided value. If not specified, the password is changed to a random string.

Example request

<SiteLockOnlineRequest>
    <authentication>
        <user>Username</user>
        <password>Password</password>
    </authentication>
    <passwordReset>
        <account_id>411844</account_id>
        <pass>doe_124</pass>
    </passwordReset>
</SiteLockOnlineRequest>

Response format

Example success response

The API success response returns the username and new password of the given account.

<SiteLockOnlineResponse>
    <passwordReset>
        <pass>doe_124</pass>
        <user>[email protected]</user>
    </passwordReset>
</SiteLockOnlineResponse>

Example error response

The API error response returns a brief reason if the password couldn’t be changed.

<SiteLockOnlineResponse>
    <passwordReset>
        <error>Bad User</error>
    </passwordReset>
</SiteLockOnlineResponse>