Description

This function checks for username conflicts during account creation.

Examples 


https://hostname.example.com:2087/cpsess##########/json-api/verify_new_username?api.version=1&user=username
https://hostname.example.com:2087/cpsess##########/xml-api/verify_new_username?api.version=1&user=username
whmapi1 verify_new_username user=username

Success:

{  
  "metadata":{  
      "version":1,
      "reason":"OK",
      "result":1,
      "command":"verify_new_username"
   }
}

Failure:

{  
  "metadata":{  
      "version":1,
      "reason":"API failure: (XID fx6xw3) This system already has an account named “nick”.",
      "result":1,
      "command":"verify_new_username"
   }
}

Success:

<result>
    <metadata>
        <version>1</version>
        <command>verify_new_username</command>
        <reason>OK</reason>
        <result>1</result>
    </metadata>
</result>

Failure:

<result>
    <metadata>
        <reason>
            API failure: (XID fx6xw3) This system already has an account named &#x201C;nick&#x201D;.
        </reason>
        <result>0</result>
        <command>verify_new_username</command>
        <version>1</version>
    </metadata>
</result>

   

Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The account that you wish to create.

A valid string.

username

 

Returns

This function only returns metadata.

If the function detects a username conflict, it outputs an error message in the reason return.