---
title: "Verify magic link and authenticate"
method: POST
path: "/auth/magic-link/verify"
tags: ["Auth"]
---

# Verify magic link and authenticate

`POST /auth/magic-link/verify`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/auth/magic-link/verify`
- Auth: none declared

Validates the magic link token and returns authentication tokens

## Request body

- object
  - `token` string, required: The magic link token

## Response `200`

Authentication successful

- object
  - `success` boolean
  - `data` object
    - `user` UserProfile
      - `id` string, uuid
      - `email` string
      - `first_name` string
      - `last_name` string
      - `role` string
    - `tokens` AuthTokens
      - `accessToken` string
      - `refreshToken` string
      - `expiresIn` number
    - `isFirstLogin` boolean

## Other responses

- `400`: Invalid or expired token

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
