API Reference

Change Password

Change the password of the user linked to the active session.

Endpoint

POST /api/v2/change-password https://authly.cc

Parameters

FieldDescription
session_id Required Active session ID from a successful Init call.
old_password Required The user's current password.
new_password Required The new password to set for the account.

Example Request

{
  "session_id": "dc1ce...a3a75",
  "old_password": "old",
  "new_password": "new"
}

Responses

Password changed successfully.

{
  "success": true,
  "message": "Password changed successfully"
}

Missing fields or password matches the current one. Codes: MISSING_FIELDS, PASSWORD_REUSED.

{
  "success": false,
  "code": "MISSING_FIELDS",
  "message": "Required fields are missing"
}

Session or password check failed. Codes: INVALID_SESSION, SESSION_EXPIRED, INVALID_PASSWORD.

{
  "success": false,
  "code": "INVALID_PASSWORD",
  "message": "Invalid password"
}

Password change disabled or user blocked. Codes: PASSWORD_CHANGE_UNAVAILABLE, USER_BANNED, USER_SUSPENDED.

{
  "success": false,
  "code": "PASSWORD_CHANGE_UNAVAILABLE",
  "message": "Password change is disabled for this app"
}

USER_NOT_FOUND — No user linked to this session.

{
  "success": false,
  "code": "USER_NOT_FOUND",
  "message": "User not found"
}

INTERNAL — Unexpected server-side error.

{
  "success": false,
  "code": "INTERNAL",
  "message": "An internal server error occurred"
}