---
title: "Verify two-factor authentication"
method: POST
path: "/auth/2fa/verify"
tags: ["auth"]
---

# Verify two-factor authentication

`POST /auth/2fa/verify`

## Request body

- object
  - `token` string, required

## Response `200`

Token verified successfully

- object
  - `status` string
  - `statusCode` integer
  - `message` string
  - `data` UserSchema — Object describing the user related to the issued access and refresh tokens.
    - `first_name` string — firstname of the user
    - `last_name` string — lastname of the user
    - `role` integer — User's role type (superadmin or user)
    - `email` string — User's primary contact email.
    - `phone` string, phone — User's primary contact phone number.
    - `username` string — Last updated time
    - `created_at` string, date-time — Time of registration
    - `updated_at` string, date-time — Last updated time
    - `access_token` string — A valid JWT that will expire in `expires_in` seconds.
    - `expires_at` string, date-time — UNIX timestamp after which the `access_token` should be renewed by using the refresh token with the `refresh_token` grant type.

## Other responses

- `400` — Invalid input
- `422` — Validation error
- `500` — Server error

---

[API](https://skmtc.net/hngprojects/apis/kimiko-golang-swagger.md) · [All operations](https://skmtc.net/hngprojects/apis/kimiko-golang-swagger/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hngprojects/kimiko-golang-swagger/revisions/2d1d3ed96bb9/schema)
