User password
Change a password with the current one, or set one from a restore link.
Two operations change a password, and which to use depends on what the caller holds.
password/set takes the session hash from a password restore email, which is how a forgotten password is reset. password/change takes an ordinary session plus the existing password, which is how a signed-in user changes theirs.
Both work only with a standard user session. Calling either with an API key returns error 4, "User or API key not found or session ended", even though the key itself is valid.
API actions
API base path: /user/password.
Change the password for the current user.
Requires a password-change session, so an ordinary session hash or API key cannot call this operation.
Changing a password ends every other session for the account.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
New password for the user. 12 to 20 characters, combining uppercase and lowercase letters, digits, and at least one special character. A password matching any of the last 10 used is rejected.
The API enforces this through the platform password policy, which userGetInfo returns as paas_settings.password_policy, including which characters count as special.
Password changed
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
In demo mode this function is disabled, error code 101.
Error response object
POST /v2/user/password/change HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"password": "text"
}{
"success": true
}Errors
These errors come in addition to the general error codes:
101 - In demo mode this function is disabled, when the session hash belongs to a demo user.
Set a new password for the current user.
Requires a session hash, and a standard session specifically. An API key is rejected with error code 4.
Setting a password ends every other session for the account.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Current password of the user.
New password for the user. 12 to 20 characters, combining uppercase and lowercase letters, digits, and at least one special character. A password matching any of the last 10 used is rejected.
The API enforces this through the platform password policy, which userGetInfo returns as paas_settings.password_policy, including which characters count as special.
Password set
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
In demo mode this function is disabled, error code 101. Error codes 245 new password must be different and 248 wrong password return the default 400.
Error response object
POST /v2/user/password/set HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 45
{
"old_password": "text",
"new_password": "text"
}{
"success": true
}Errors
These errors come in addition to the general error codes:
101 - In demo mode this function is disabled, when the session hash belongs to a demo user.
245 - New password must be different, when
old_passwordandnew_passwordmatch.248 - Wrong password, when
old_passwordis wrong.
Last updated
Was this helpful?