title |
---|
Change password |
import { Callout } from 'nextra-theme-docs' import { Tab, Tabs } from 'nextra-theme-docs'
This endpoint changes the password of the vPanel user account associated with the provided information.
POST https://panel.myownfreehost.net/json-api/passwd.php
<Tabs items={['cURL', 'Python']}>
bash curl -X POST -u username:password -d "user=username&pass=password" "https://panel.myownfreehost.net/json-api/passwd.php"
```python
import requests
from requests.auth import HTTPBasicAuth
url = "https://panel.myownfreehost.net/json-api/passwd.php"
data = {'user': 'username', 'pass': 'password'} # For the username, use the same username you set when creating the account.
response = requests.post(url, params=data, auth=HTTPBasicAuth('username', 'password'))
print(response.json())
# Do this if you only want to get the status code.
print(response.json()["passwd"][0]["status"])
```
</Tab>
```json
{
"passwd": [
{
"statusmsg": "Password changed for user username.",
"services": [
{
"app": "system"
},
{
"app": "ftp"
},
{
"app": "mail"
},
{
"app": "MySQL"
},
{
"app": "webdisk (digest)"
}
],
"rawout": "Password changed",
"status": 1
}
]
}
```