Overview
TheResetEntry model is used to change the password of an existing short URL. This allows you to update security credentials or add/remove password protection from a previously created short URL.
When to Use
This model is used in:- POST /change_password - Update the password for an existing short URL
Schema Definition
The short code of the URL whose password you want to change.This must match an existing short URL in the system.
The current password for the short URL.Authentication:
- Must match the current password on record
- Use empty string
""if the URL currently has no password - Required for verification before allowing password change
The new password to set for the short URL.Validation Rules:
- Must be 3-20 characters long (cannot be empty)
- Must be different from
old_url_pass - Standard password validation applies (same as
url_passin URLEntry)
Unlike URLEntry, this field cannot be empty - use a different endpoint to remove password protection
Example JSON
Validation Rules
Password Requirements
Password Requirements
New Password Must:
- Be at least 3 characters long
- Not exceed 20 characters
- Be different from the old password
"abc"(minimum length)"my-secure-pass-2024"(maximum length: 20 chars)"P@ssw0rd!"(special characters allowed)
"ab"(too short)"this-is-a-very-long-password-string"(too long)- Same value as
old_url_pass(must be different)
Authentication Requirements
Authentication Requirements
The
old_url_pass field is used for authentication:- If the URL has a password, provide the correct current password
- If the URL has no password, provide an empty string
"" - Incorrect old password will result in 401 Unauthorized error
Use Cases
Common Password Change Scenarios:
- Security Breach - Change password if you suspect unauthorized access
- Add Protection - Add a password to a previously public short URL
- Credential Rotation - Periodically update passwords for security
- Share Access - Change to a new password when sharing with different users
Response
Successful password change returns:Error Cases
Security Best Practices
Password Change Guidelines
Password Change Guidelines
- Use Strong Passwords - Combine letters, numbers, and special characters
- Avoid Reuse - Don’t reuse old passwords
- Regular Rotation - Change passwords periodically for sensitive links
- Secure Transmission - Always use HTTPS for password change requests
- Token Management - Obtain a new access token after password change
Alternative: Removing Password Protection
This endpoint requires a non-empty
new_url_pass. To remove password protection entirely, you may need to:- Delete and recreate the URL without a password, or
- Use a different endpoint if available for removing protection
Related Endpoints
- Change Password - Uses this model
- Login - Login with new password after change
- Create URL - Set initial password when creating