P12 Password Changer
Safely change the password of a PKCS#12 (.p12) certificate file.
Endpoint
POST /api/p12passwordchanger
Description
This endpoint accepts a P12 file, its current password, and a desired new password. It decrypts the file and re-encrypts it with the new password. The response includes a temporary secure download link for the modified .p12 file.
Headers
| Header | Value | Required |
|---|---|---|
Authorization |
Bearer <your_api_token> |
Yes |
Accept |
application/json |
Yes |
Content-Type |
multipart/form-data |
Yes |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
p12_file |
File | Yes | The .p12 or .pfx file to modify. |
old_password |
String | Yes | The current password of the P12 file. |
new_password |
String | Yes | The new password to set for the file. |
Example Request
curl -X POST https://developer.nabzclan.vip/api/p12passwordchanger \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-F "[email protected]" \
-F "old_password=oldpass123" \
-F "new_password=newpass456"
Responses
Success (200 OK)
Returns a JSON object with download URLs.
{
"success": true,
"error": null,
"data": {
"message": "Password changed successfully",
"download_url": "https://developer.nabzclan.vip/api/p12passwordchanger/download/...",
"password": "newpass456",
"filename": "modified_certificate.p12",
"warning": "Download URL is valid for one-time use only. File will be deleted after first download."
}
}
Error (400 Bad Request)
Returned if the old password is incorrect or the file is invalid.
{
"error": "Incorrect old password."
}
Error (500 Internal Server Error)
Returned if the encryption or processing failed.
{
"error": "Internal server error: ..."
}