Send One-Time Passcode
POST/wallet-registration/otp
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.
Request
Header Parameters
Authorization stringrequired
SEP-24 token for authorization (Format: 'Bearer {token}')
- application/json
Body
required
Object containing phone number
phone_number stringrequired
Phone number to which the OTP will be sent
recaptcha_token stringrequired
Token for reCAPTCHA validation
Responses
- 200
- 400
- 401
- 429
OTP sent successfully
- application/json
- Schema
- Example (from schema)
Schema
message stringrequired
{
"message": "string"
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
error string
Details about the error
extras
object
object
{
"error": "Invalid input",
"extras": {
"field_foo": "field_foo is required",
"field_bar": "field_bar needs to be an integer"
}
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
error string
extras
object
status number
message 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 string
details string
{
"error": "string",
"extras": {
"code": "string",
"details": "string"
}
}
Loading...