Phone number verification for web and mobile apps.
npm install phonelinkimport { phonelink } from "phonelink/web";
// Start the verification flow
phonelink.startVerify("your-client-id", "https://myapp.com/callback");
// On the callback page, get the result
const result = phonelink.getRedirectResult();
// Send to your server for verification
await fetch("/api/verify", {
method: "POST",
body: JSON.stringify({ token: result.token, nonce: result.nonce }),
});import { validate } from "phonelink/validate";
const payload = await validate(token, nonce, "your-client-id");
console.log(payload.phone_e164); // "+14155551234"Read the full documentation at docs.phone.link
- Getting Started — overview and installation
- Web (Vanilla JS) — redirect-based flow for any web app
- React —
usePhonelinkhook - Next.js — full-stack App Router recipe
- Expo / React Native — in-app browser flow
- Server Verification — JWT token validation
- API Reference — full API docs
- Security — security model and best practices
MIT