reference

Magic Link (OTP)

Send a passwordless magic link to a user's email address.

Published: March 22, 2026Updated: March 22, 2026

Magic Link (OTP)

Send a one-time passwordless login link to any email address.

POST /api/auth/v1/otp
Authorization: Bearer pb_anon_<key>
Content-Type: application/json

{ "email": "user@example.com" }
GET /api/auth/v1/verify?token=<otp-token>

On success, Postbase sets the postbase-session cookie and redirects the browser.

SDK Example

const { error } = await postbase.auth.signInWithOtp({
  email: 'user@example.com',
})