Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
86 lines (71 loc) · 1.92 KB

File metadata and controls

86 lines (71 loc) · 1.92 KB

Set User Password

Name Requires Auth Permission Setting
setUserPassword Yes

{% hint style="info" %} The workspace administrator must enable the Require password change field for the user. {% endhint %}

Payload Parameters

Argument Example Required Description
password pass123 Required The new password.

Example Call

{
    "msg": "method",
    "method": "setUserPassword",
    "id": "2",
    "params": [
      "pass123"
        
    ]
}

Example Response

{
    "msg": "result",
    "id": "2",
    "result": true
}

Errors

  • Same password: This occurs when the new password is same as the current password.
  • Not Allowed: This occurs when the user does not have Require password change enabled.

{% tabs %} {% tab title="Same password" %}

{
    "msg": "result",
    "id": "2",
    "error": {
        "isClientSafe": true,
        "error": "error-password-same-as-current",
        "reason": "Entered password same as current password",
        "details": {
            "method": "setUserPassword"
        },
        "message": "Entered password same as current password [error-password-same-as-current]",
        "errorType": "Meteor.Error"
    }
}

{% endtab %}

{% tab title="Not allowed" %}

{
    "msg": "result",
    "id": "2",
    "error": {
        "isClientSafe": true,
        "error": "error-not-allowed",
        "reason": "Not allowed",
        "details": {
            "method": "setUserPassword"
        },
        "message": "Not allowed [error-not-allowed]",
        "errorType": "Meteor.Error"
    }
}

{% endtab %} {% endtabs %}