When to use
Use OTP authentication when:- You are building a user-facing application that needs per-user identity
- Your users have a registered mobile number on the Zeam platform
- You want Zeam to handle OTP delivery (no need to build your own)
How it works
Step by step
Using the Go SDK
Endpoints
| Method | Path | Purpose |
|---|---|---|
POST | /v1/public/auth/request-otp | Send the OTP, receive a session ID |
POST | /v1/public/auth/verify-otp | Exchange the code for tokens |
POST | /v1/public/auth/refresh | Refresh the access token |
Request fields
| Field | Required | Description |
|---|---|---|
zeamid | Yes | The user’s Zeam ID |
mobile | Yes | E.164 mobile number (e.g., +27821234567) |
kind | Yes | One of user, member, or third_party_user |
Error handling
| Status | Scenario | Action |
|---|---|---|
400 | Missing or malformed mobile | Check the request body |
401 | Wrong OTP code | Ask the user to re-enter the code |
404 | No matching user for the supplied identifiers | Verify the zeamid and mobile |
409 | OTP session already consumed | Start a new OTP request |
429 | Too many OTP requests | Wait before retrying |

