v4

latestOpenAPI 3.1.1Apache 2.02026-07-31107278570.4 KB
Magic link & OTP

Verify passwordless email

Verify a user's identity using either a verification code or magic link token

post/api/v1/passwordless/email/verify

Request body

auth_request_idstring

The authentication request identifier returned from the send passwordless email endpoint. Required when verifying OTP codes to link the verification with the original request.

codestring

The Verification Code (OTP) received via email. This is typically a 6-digit numeric code that users enter manually to verify their identity.

link_tokenstring

The unique token from the magic link URL received via email. Extract this token when users click the magic link and are redirected to your application to later verify the user.

Example request

{
  "auth_request_id": "h5Y8kT5RVwaea5WEgW4n-6C-aO_-fuTUW7Vb9-Rh3AcY9qxZqQ",
  "code": "123456",
  "link_token": "afe9d61c-d80d-4020-a8ee-61765ab71cb3"
}

Response

Successfully verified the passwordless authentication. Returns user email

emailstring

Email address of the successfully authenticated user. This confirms which email account was verified through the passwordless flow.

passwordless_type'OTP' | 'LINK' | 'LINK_OTP'
statestring

The custom state parameter that was provided in the original authentication request, returned unchanged. Use this to restore your application's context after authentication.

template'SIGNIN' | 'SIGNUP'

Example response

{
  "email": "john.doe@example.com",
  "state": "kdt7yiag28t341fr1"
}