---
title: "Verify the magic link token"
method: POST
path: "/auth/magick-link/verify"
tags: ["auth"]
---

# Verify the magic link token

`POST /auth/magick-link/verify`

## Request

- Base URL: `https://staging.api-golang.boilerplate.hng.tech/api/v1`
- URL: `https://staging.api-golang.boilerplate.hng.tech/api/v1/auth/magick-link/verify`
- Auth: none declared
- TypeScript: <https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/docs/auth/magick-link/verify/post.ts> (a function with typed inputs; its response is checked against the schema)

## 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.dev/hngprojects/apis/kimiko-golang-swagger.md) - [All operations](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/llms.txt) - [OpenAPI document](https://skmtc.dev/hngprojects/apis/kimiko-golang-swagger/revisions/2d1d3ed96bb9?raw)
