Send One-Time Passcode
This endpoint generates a 6-digit OTP and sends it via SMS to the phone number provided in the request body (after checking that the phone number matches a receiver phone number in the SDP). A valid SEP-24 token should be included in the Authorization header of the request.
Header Parameters
- Authorization string required
SEP-24 token for authorization (Format: 'Bearer {token}')
- application/json
Request Body required
Object containing phone number
- phone_number string required
Phone number to which the OTP will be sent
- recaptcha_token string required
Token for reCAPTCHA validation
Responses
- 200
- 400
- 401
- 429
OTP sent successfully
- application/json
- Schema
- Example (from schema)
Schema
- message string required
{
"message": "string"
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
- message string
Details about the error
{
"message": "string"
}
Unauthorized
Response Headers
- application/json
- Schema
- Example (from schema)
- response
Schema
- error string
extras object
status numbermessage string
{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}
{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}
An OTP was sent to the given user recently and hasn't expired yet. Only after expired it will be sent to the user again.
- application/json
- Schema
- Example (from schema)
Schema
- error string
extras object
code stringdetails string
{
"error": "string",
"extras": {
"code": "string",
"details": "string"
}
}
Loading...