Send One-Time Passcode
POST/wallet-registration/otp
This endpoint generates a 6-digit OTP and sends it to the user contact (email or phone number SMS) provided in the request body, as long as it matches the receiver contact info stored in the SDP. A valid SEP-24 token should be included in this request's Authorization header.
Request
Header Parameters
SEP-24 token for authorization (Format: 'Bearer {token}')
- application/json
Body
required
Object containing phone number
Phone number to which the OTP will be sent. Either phone_number
or email
is required.
Email to which the OTP will be sent. Either phone_number
or email
is required.
Token for reCAPTCHA validation
Responses
- 200
- 400
- 401
- 429
OTP sent successfully
- application/json
- Schema
- Example (from schema)
Schema
{
"message": "string"
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
Details about the error
extras
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
extras
object
{
"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
extras
object
{
"error": "string",
"extras": {
"code": "string",
"details": "string"
}
}