Function: changepass
To make use of the ‘udp‘ Action, the following parameters must be sent:
-
- key: Key authorized by Api administrator
- action: udp
- user: Account username
- pass: New password (Must be greater than 8 characters)
– Possible answers:
-
- status -> OK
- status -> Error -> user does not exist
Example of code in php
$data = array(“key” => “MYKEY”,”action”=>’udp’,”user”=>’USER’,”pass”=>’MYPASS’); $url = “https://IPSERVERAPI:2304/v1/changepass”; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, “POST”); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt ($ch, CURLOPT_POST, 1); $response = curl_exec($ch); curl_close($ch);