---
url: "https://vueda.dev/v3/reference/api/py/vueda.user.serializers/TOTPSetupSerializer.md"
title: "TOTPSetupSerializer"
---

# TOTPSetupSerializer

## Overview

The BaseSerializer class provides a minimal class which may be used
for writing custom serializer implementations.

Note that we strongly restrict the ordering of operations/properties
that may be used on the serializer in order to enforce correct usage.

In particular, if a `data=` argument is passed then:

.is_valid() - Available.
.initial_data - Available.
.validated_data - Only available after calling `is_valid()`
.errors - Only available after calling `is_valid()`
.data - Only available after calling `is_valid()`

If a `data=` argument is not passed then:

.is_valid() - Not available.
.initial_data - Not available.
.validated_data - Not available.
.errors - Not available.
.data - Available.

## `validate` {#validate}

### Signature {#validate-signature}

`validate(self, data)`

#### Parameters {#validate-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| self |  | yes |  |  |
| <span id="validate-param-data">data</span> |  | yes |  |  |

### Source {#validate-source}

`server/vueda/user/serializers.py:261`

## `destination` {#destination}

## `method` {#method}

## Source

`server/vueda/user/serializers.py:255`
