---
title: "Verify 2FA"
method: POST
path: "/api/v1/auth/verify-2fa"
tags: ["Authentication"]
---

# Verify 2FA

`POST /api/v1/auth/verify-2fa`

## Request

- Base URL: `https://www.endlesstravelplans.com`
- URL: `https://www.endlesstravelplans.com/api/v1/auth/verify-2fa`
- Auth: none required

Complete two-factor authentication after login.

## Request body

- object
  - `two_factor_token` string, required: The temporary token from login.
  - `code` string, required: The 6-digit verification code.

## Response `200`

- union
  - object: Signed in
    - `user` object
      - `id` integer
      - `first_name` string
      - `last_name` string
      - `email` string
      - `phone` string, nullable
      - `bio` string, nullable
      - `preferred_language` string, nullable
      - `timezone` string
      - `profile_photo_url` string, nullable
      - `has_pro_access` boolean
      - `subscription_plan` string
      - `can_create_trip` boolean
      - `max_saved_trips` integer
      - `is_anonymous` boolean
      - `marketing_consent` boolean
      - `marketing_consent_source` string
      - `created_at` string
    - `token` string
    - `expires_in` integer
    - `expires_at` string
  - object: Guest merged
    - `user` object
      - `id` integer
      - `first_name` string
      - `last_name` string
      - `email` string
      - `phone` string, nullable
      - `bio` string, nullable
      - `preferred_language` string, nullable
      - `timezone` string
      - `profile_photo_url` string, nullable
      - `has_pro_access` boolean
      - `subscription_plan` string
      - `can_create_trip` boolean
      - `max_saved_trips` integer
      - `is_anonymous` boolean
      - `marketing_consent` boolean
      - `marketing_consent_source` string
      - `created_at` string
    - `token` string
    - `expires_in` integer
    - `expires_at` string
    - `merged` boolean

## Other responses

- `401`
- `422`
- `429`
- `500`: server_error: Unhandled failure; quote `request_id` to support.

---

[API](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api.md) · [All operations](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api/llms.txt) · [OpenAPI document](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api/revisions/ae82ed3e4a8f?raw)
