Forget Password (T105)
Reset a forgotten password for an enterprise user account. This endpoint allows administrators to resubmit a new password for a given username, triggering an email with updated account credentials.
Endpoint Overview
| Property | Value |
|---|---|
| Interface Code | T105 |
| Request Encrypted | ✅ Yes |
| Response Encrypted | ❌ No |
| Request Body | { "userName": "...", "changedPassword": "..." } |
| Response Format | null |
Flow Description
- Enterprise user forgets their password.
- Administrator submits a new password corresponding to the username via this endpoint.
- Server validates the request and sends account recovery information to the registered enterprise user email.
- User receives email with instructions to complete password reset.
🔐 Security Note: This endpoint requires encrypted requests. Ensure your
KeyClientis properly initialized with symmetric key (T104) before calling.
- PHP
- JavaScript / TypeScript
- Python
try {
// Call T105: Forget Password
$response = $client->forgetPassword(
userName: 'admin',
changedPassword: 'TempPass123!'
);
// Response is null on success
echo "✅ Password reset request submitted\n";
echo " Check registered email for account recovery instructions\n";
} catch (\UraEfrisSdk\Exceptions\APIException $e) {
echo "❌ Password reset failed: " . $e->getMessage() . "\n";
echo " Return Code: " . $e->getReturnCode() . "\n";
}
try {
// Call T105: Forget Password
await client.forgetPassword(
'admin', // userName
'TempPass123!' // changedPassword
);
// Response is null on success
console.log('✅ Password reset request submitted');
console.log(' Check registered email for account recovery instructions');
} catch (error: any) {
console.error(`❌ Password reset failed: ${error.message}`);
if (error.returnCode) {
console.error(` Return Code: ${error.returnCode}`);
}
throw error;
}
try:
# Call T105: Forget Password
client.forget_password(
user_name='admin',
changed_password='TempPass123!'
)
# Response is null on success
print("✅ Password reset request submitted")
print(" Check registered email for account recovery instructions")
except Exception as e:
print(f"❌ Password reset failed: {e}")
if hasattr(e, "return_code"):
print(f" Return Code: {e.return_code}")
raise
Request Structure
{
"data": {
"content": "BASE64_ENCODED_ENCRYPTED_PAYLOAD",
"signature": "JKQWJK34K32JJEK2JQWJ5678",
"dataDescription": {
"codeType": "1",
"encryptCode": "2",
"zipCode": "0"
}
},
"globalInfo": {
"appId": "AP04",
"version": "1.1.20191201",
"dataExchangeId": "9230489223014123",
"interfaceCode": "T105",
"requestCode": "TP",
"requestTime": "2025-02-19 10:00:00",
"responseCode": "TA",
"userName": "admin",
"deviceMAC": "FFFFFFFFFFFF",
"deviceNo": "TCS9e0df01728335239",
"tin": "1000029771",
"taxpayerID": "1"
}
}
Request Fields (Encrypted Payload)
| Field | Required | Type | Length | Description |
|---|---|---|---|---|
userName | ✅ Yes | String | ≤200 | Username of the account requiring password reset |
changedPassword | ✅ Yes | String | ≤200 | New password to assign to the account |
⚠️ Password Requirements: Ensure the new password meets your organization's complexity policies (minimum length, special characters, etc.) before submission.
Response Structure
null
✅ A successful request returns
null. Check the registered email address for account recovery instructions.
Return Codes
| Code | Message | Description |
|---|---|---|
00 | SUCCESS | Password reset request accepted; email sent |
99 | Unknown error | Generic server error |
06 | The outer message is empty | Malformed request envelope |
07 | GlobalInfo content cannot be empty | Missing required globalInfo |
11 | InterfaceCode cannot be empty | Missing interfaceCode in request |
400 | Device does not exist | deviceNo not registered for this TIN |
402 | Device key expired | Device credentials have expired; re-run T102 |
403 | Device status is abnormal | Device blocked or suspended |
2779 | userName:cannot be empty! | Missing username in request |
2780 | userName:Byte length cannot be greater than 200! | Username exceeds maximum length |
2781 | changedPassword:cannot be empty! | Missing new password in request |
2782 | changedPassword:Byte length cannot be greater than 200! | Password exceeds maximum length |
💡 Tip: This endpoint is typically used in administrative workflows. End-users should be directed to a self-service portal for password recovery when available.
Common Use Cases
-
Administrative Password Reset
System administrators reset passwords for enterprise users who have lost access. -
Account Recovery Workflow
Integrate with email/SMS systems to provide multi-factor account recovery. -
Bulk User Management
Reset passwords for multiple users during organizational onboarding or security audits. -
Compliance & Security Audits
Force password changes for users following security policy updates or breach investigations.
Integration Checklist
✅ Ensure symmetric key (T104) is active before calling encrypted endpoints
✅ Validate password complexity client-side before submission
✅ Log password reset requests for audit trails (never log passwords)
✅ Handle null response as success; check email delivery separately
✅ Implement retry logic for transient network errors (codes 99, 402)