auth

Send OTP code

Sends a one-time code via SMS or email for the given project. Use verify endpoint to exchange the code for a session. Public endpoint; rate limited.

POST/api/auth/otp/send

Authentication

Public — No Auth Required

Request Body

Project ID, delivery method (sms/email), and phone or email.

json
{
  "phone": "1-633-595-3807 x7079",
  "email": "amari_koss69@northwind.dev",
  "projectId": "proj_qh5hFHNT70YZ",
  "method": "sms"
}
{
  "phone": "1-633-595-3807 x7079",
  "email": "amari_koss69@northwind.dev",
  "projectId": "proj_qh5hFHNT70YZ",
  "method": "sms"
}

SDK setup

Create a client instance. No authentication is required for this endpoint.

import { MudbaseClient } from "mudbase";

const client = new MudbaseClient();
import { MudbaseClient } from "mudbase";

const client = new MudbaseClient();

Example request

Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.

const result = await client.auth.sendOtp({
  projectId: "proj_lOPDKvZROQXs",
  method: "pixel quantify",
  phone: "921-735-3192 x69033",
  email: "katelin.schimmel66@northwind.dev"
});
const result = await client.auth.sendOtp({
  projectId: "proj_lOPDKvZROQXs",
  method: "pixel quantify",
  phone: "921-735-3192 x69033",
  email: "katelin.schimmel66@northwind.dev"
});

Try It Live

Test this endpoint with your own credentials. Your requests will be sent to the live API.

No Request Yet

Send a request to see the full inspector

Responses

200OTP sent
json
{
  "message": "OTP code sent successfully"
}
{
  "message": "OTP code sent successfully"
}
400Bad request or validation error.
401Authentication required or invalid token.
403Access denied or insufficient permissions.

Errors

CodeMeaning
400Bad request or validation error.
401Authentication required or invalid token.
403Access denied or insufficient permissions.
Edit this page on GitHub