Change the password
const url = 'https://api.emite.cr/v1/auth/change-password';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"currentPassword":"S3guroPass!","newPassword":"café lluvia tortuga"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.emite.cr/v1/auth/change-password \ --header 'Content-Type: application/json' \ --data '{ "currentPassword": "S3guroPass!", "newPassword": "café lluvia tortuga" }'Changes the password of the signed-in person; requires the current password. Closes every OTHER session of the person (and unlinks their WhatsApp number). This session continues under a new token, returned in the X-Session-Token header.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The current password of the account. A wrong one answers 400 INVALID_CURRENT_PASSWORD.
Example
S3guroPass!The new password, different from the current one (400 SAME_PASSWORD). A password the person chooses: 12 to 72 characters, not built on the name or the email of the account, and hard to guess (no common or leaked password, sequence, keyboard pattern or date; the same estimator the app shows under the field). Upper case, digits and symbols are neither required nor refused. Refused with 400 PASSWORD_TOO_WEAK, whose params.reason is too_short, too_long, personal_info or too_guessable. Passwords set before this rule keep working to sign in.
Example
café lluvia tortuga