Nest Authbeta

DELETE /auth/admin/api/users/{id}/totp-devices/{deviceId}

Remove a user's TOTP device

Remove a user's TOTP device

DELETE/auth/admin/api/users/{id}/totp-devices/{deviceId}

Path parameters

NameTypeRequiredDescription
idstringrequired
deviceIdstringrequired

Responses

200
400Validation failed (bad input).

ApiErrorResponseDto

FieldTypeRequiredDescription
statusCodenumberrequiredHTTP status code
Example: 401
errorstringrequiredHTTP status text / exception name
Example: Unauthorized
messagestringrequiredHuman-readable message
Example: Invalid credentials
codestringrequiredStable, machine-readable error code — branch on this, not the message
Example: INVALID_CREDENTIALS

Example response

{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Invalid credentials",
  "code": "INVALID_CREDENTIALS"
}
401Admin session missing or invalid.

ApiErrorResponseDto

FieldTypeRequiredDescription
statusCodenumberrequiredHTTP status code
Example: 401
errorstringrequiredHTTP status text / exception name
Example: Unauthorized
messagestringrequiredHuman-readable message
Example: Invalid credentials
codestringrequiredStable, machine-readable error code — branch on this, not the message
Example: INVALID_CREDENTIALS

Example response

{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Invalid credentials",
  "code": "INVALID_CREDENTIALS"
}
403Authenticated but not permitted.

ApiErrorResponseDto

FieldTypeRequiredDescription
statusCodenumberrequiredHTTP status code
Example: 401
errorstringrequiredHTTP status text / exception name
Example: Unauthorized
messagestringrequiredHuman-readable message
Example: Invalid credentials
codestringrequiredStable, machine-readable error code — branch on this, not the message
Example: INVALID_CREDENTIALS

Example response

{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Invalid credentials",
  "code": "INVALID_CREDENTIALS"
}
404User not found.

ApiErrorResponseDto

FieldTypeRequiredDescription
statusCodenumberrequiredHTTP status code
Example: 401
errorstringrequiredHTTP status text / exception name
Example: Unauthorized
messagestringrequiredHuman-readable message
Example: Invalid credentials
codestringrequiredStable, machine-readable error code — branch on this, not the message
Example: INVALID_CREDENTIALS

Example response

{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Invalid credentials",
  "code": "INVALID_CREDENTIALS"
}

Try it

curl -X DELETE 'https://api.example.com/auth/admin/api/users/{id}/totp-devices/{deviceId}' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'

On this page