Skip to content

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/json
json
{
  "partner_id": "{{partner_id}}",
  "partner_key": "{{partner_key}}",
  "token": "{{token}}"
}

Parameters:

ParamTypeRequiredDefaultDescription
partner_idstringYes—The partner id.
partner_keystringYes—The partner key.
tokenstringYes—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"
}
FieldTypeDescription
successboolRequest status.
codeintThe status code — 1 on success.
messagestringThe 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 ​

CodeDescription
3Parameter invalid
103Thông tin Partner không chính xác — Partner details are incorrect.
126Có lỗi xảy ra vui lòng thử lại — An error occurred, please retry.
129Token không hợp lệ — Invalid token.

Next Steps ​

  • Register — register the replacement device
  • Get Status — confirm the retirement took effect

Developers