---
title: "SMS code prelogin"
method: POST
path: "/resources/auth/v1/passwordless/smscode/prelogin"
tags: ["Passwordless"]
---

# SMS code prelogin

`POST /resources/auth/v1/passwordless/smscode/prelogin`

## Request

- Base URL: `http://localhost:8181`
- URL: `http://localhost:8181/resources/auth/v1/passwordless/smscode/prelogin`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/docs/resources/auth/v1/passwordless/smscode/prelogin/post.ts> (a function with typed inputs; its response is checked against the schema)

This route triggers the system to send an SMS to the user and is the first step when authenticating using the sms otc passwordless mechanism. Send the **`frontegg-vendor-host`** as a header to declare which vendor. This is your domain name in the Frontegg Portal ➜ Workspace Settings ➜ Domains ➜ Domain Name. Send the user's email as POST body params. Include the invitation token if the user is signing up by invitation. Send the recaptcha token if the recaptcha is enabled for login.

## Request body

- PasswordlessAuthenticationSmsOtcPreloginDto
  - `recaptchaToken` string
  - `invitationToken` string
  - `email` string, required
  - `userId` string, required
  - `phoneNumber` string, required

## Response `201`

- PasswordlessAuthenticationSmsOTCPreloginResponseDto
  - `phoneNumber` string
  - `resetPhoneNumberToken` string

## Other responses

- `400`: User does not have a phone number

---

[API](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp.md) - [All operations](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/llms.txt) - [OpenAPI document](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/revisions/c496ae9e1c3e?raw)
