# Verify TOTP Technical Overview

## Data model

The data model does not require any PII (such as phone or email).

![Flowchart showing OwlBank service using customer identifier with TOTP seeds for login, transaction, and password reset.](https://docs-resources.prod.twilio.com/1cd893ddc55cfc33094e720227f5222be45897952daca57c2e1f92ae9d82c0d1.png)

## Resource definitions

* **[Service](/docs/verify/api/service)**: an organization or environment (e.g. stage, prod). Contains configurations for all verification methods available through the Verify platform (SMS OTP, Voice OTP, Email OTP, Push Verification, TOTP). A Twilio \[sub]account can have multiple Services. Each Service contains multiple Entities that are not shared across Services.
* **[Entity](/docs/verify/api/entity)**: a user or other identity that needs verification. An Entity can contain multiple Factors.
* **[Factor](/docs/verify/api/factor)**: a verification method, which involves an exchange of secrets via a communication channel. For factor\_type **totp**, which follows the [RFC-6238](https://tools.ietf.org/html/rfc6238) algorithm, the Factor contains the seed (Binding.Secret) that is used to generate the TOTP. A Factor contains multiple Challenges.
* **[Challenge](/docs/verify/api/challenge)**: a single verification attempt of an Entity using a Factor. A single Factor has multiple Challenges.

## Sequence Diagram

Verify TOTP involves two main sequences that are shown in the diagrams below:

1. Register a user by generating a unique TOTP seed and verify that they've correctly added it to their Authenticator App for generating TOTP codes.
2. Verify a user by verifying that the TOTP code they've provided matches the TOTP code generated by the unique TOTP seed.

### Register a user and TOTP seed

![Sequence diagram of TOTP registration and verification process with user, app, frontend, backend, and API interactions.](https://docs-resources.prod.twilio.com/477afbff054313a6cc2181e872f31466b020925ab0ab2e60bce2df627dce7a36.png)

### Verify a user

![Sequence diagram showing TOTP verification process with user, authenticator app, and Verify TOTP API interactions.](https://docs-resources.prod.twilio.com/6539d2ed0d97925d20a534f92db9d98d5f71ef255b02c805ffd67a96a44cd259.png)

## Ready to start building?

Check out the [quickstart](/docs/verify/quickstarts/totp) for step-by-step instructions.
