Description

This function measures the strength of a password.

Examples 


https://hostname.example.com:2087/cpsess##########/json-api/get_password_strength?api.version=1&password=12345luggage
https://hostname.example.com:2087/cpsess##########/xml-api/get_password_strength?api.version=1&password=12345luggage
whmapi1 get_password_strength password=12345luggage

{
  "data": {
    "strength": 21
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "get_password_strength"
  }
}
<result>
    <data>
        <strength>21</strength>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>get_password_strength</command>
    </metadata>
</result>

   

Parameters

ParameterTypeDescriptionPossible valuesExample
passwordstring

Required

The password.

A valid string.

12345luggage

Returns

ReturnTypeDescriptionPossible valuesExample
strengthinteger

The password's strength.

A positive integer from 1 to 100.21