@xfloor-memory-sdk
  1. Registration
@xfloor-memory-sdk
  • Get Started
    • Overview
    • Quick Start
    • Authentication and Identification
    • Core Concepts (5-Minute Read)
    • What to Use First (API Map)
  • SDK
    • Overview
    • SDK Installation & Setup
    • Python SDK
    • JavaScript SDK
    • Typescript SDK
    • Java SDK
    • FAQ & Troubleshooting
    • Copy-Paste Debug Checklists
  • Core FloorMemory
    • Query (Primary API)
      POST
    • Create Event (Post Content)
      POST
    • Recent Events
      GET
    • Basic information of a floor
      GET
  • Floor Management
    • Edit floor
    • Make floor Private
    • Make floor public
    • Rename floor
  • Registration
    • Sign Up
      POST
    • Sign In with email ID
      POST
    • Sign In with Mobile number
      POST
    • Validation
      POST
    • Change Password
      POST
    • Reset Password
      POST
    • Change email ID
      POST
    • Change Mobile number
      POST
    • Send Validation code
      POST
    • External User Registration
      POST
  • SDKs
  • Schemas
    • PostAdd
    • QueryResponse
    • Media
    • UserDetails
    • SignUpResponse
    • BlockDetails
    • FloorInfo
    • Threads
    • EventResponse
    • 400ErrorCode
    • Remaining
  1. Registration

Send Validation code

POST
/auth-service/send/validation/code
Generates and sends a one-time validation code to the user for verification of sensitive or critical account operations.
This API is used across multiple authentication and account-management flows. The validation code is delivered to the user via the appropriate channel (email or mobile number), based on the requested operation mode and the input provided.
The generated code is time-bound, single-use, and must be validated using the corresponding verification APIs to complete the requested action.

Usage Scenarios (Mode Definition)#

ModePurpose
0Email or mobile number change
1Password change
2Delete account
3Clear account
4Signup Verification
5Using OTP for Login
6OTP for forgot password
Mode 4 – Signup Verification
For login verification, the validation code is sent to either the email ID or the mobile number provided in the request.
At least one of email or mobile number must be supplied for this mode.

Behavior#

Generates a secure, one-time validation code
Sends the code to the appropriate channel:
Email or mobile number, depending on the operation mode and input
Associates the code with:
User identity (or login identifier)
Requested operation (mode)
Application context (if applicable)
Validation codes are valid for a limited duration and cannot be reused

Authentication#

This endpoint requires Bearer Token authentication,
except where explicitly allowed (for example, login-related flows).
Authorization: Bearer <access_token>

Successful Response#

On success, the API confirms that the validation code has been generated and successfully dispatched to the user.

Error Response#

The API returns an error response if:
The user does not exist or is not eligible for the requested operation
The requested mode is invalid or unsupported
Required identifiers (email or mobile number for login verification) are missing
Rate limits are exceeded
Authorization fails (where applicable)

Security Notes (Recommended)#

Validation codes are single-use and time-bound
Rate limiting is enforced to prevent abuse
Repeated failures may trigger temporary blocking or additional verification

One-Line Summary#

Sends a one-time validation code for secure account and authentication operations, including login via email or mobile number.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params multipart/form-dataRequired

Responses

🟢200Success
application/json
Body

🟠400BadRequest
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://appfloor.in/auth-service/send/validation/code' \
--header 'Authorization: Bearer <token>' \
--form 'user_id=""' \
--form 'mobile_number=""' \
--form 'mode=""' \
--form 'email_id=""' \
--form 'app_id=""'
Response Response Example
200 - Example 1
"error": {
    "code": "XF_VALIDATION_ERROR",
    "message": "Invalid parameter: Invalid mode",
    "path": "/auth-service/send/validation/code",
    "timestamp": "2026-01-12T08:11:59.993079561Z"
}
Modified at 2026-02-27 09:52:48
Previous
Change Mobile number
Next
External User Registration
Built with