Retire Soft OTP
Deactivates the user's currently active SmartOTP. Use it before moving SmartOTP to a new device, or when a device is lost.
Endpoint
http
POST /api/v1/saas-sotp/retire
Content-Type: application/jsonjson
{
"partner_id": "{{partner_id}}",
"partner_key": "{{partner_key}}",
"token": "{{token}}"
}Parameters:
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
partner_id | string | Yes | — | The partner id. |
partner_key | string | Yes | — | The partner key. |
token | string | Yes | — | The registration token generated by Register. |
Returns: RetireResponse
Sample Request
bash
curl --location --request POST '<BASE_URL>/saas-sotp/retire' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
"partner_id": "{{partner_id}}",
"partner_key": "{{partner_key}}",
"token": "{{token}}"
}'Response
json
{
"success": true,
"code": 1,
"message": "Success"
}| Field | Type | Description |
|---|---|---|
success | bool | Request status. |
code | int | The status code — 1 on success. |
message | string | The status or error message. |
WARNING
Retiring immediately invalidates the device's secret — every code it generates afterwards fails validation. Make sure the user has an alternative authentication path before you retire their only registered device.
Errors
| Code | Description |
|---|---|
3 | Parameter invalid |
103 | Thông tin Partner không chính xác — Partner details are incorrect. |
126 | Có lỗi xảy ra vui lòng thử lại — An error occurred, please retry. |
129 | Token không hợp lệ — Invalid token. |
Next Steps
- Register — register the replacement device
- Get Status — confirm the retirement took effect