# Validate otp


# Description

You can use this API to check if some otp code is valid.

# Endpoint

    POST https://019sms.co.il/api
  

# Parameters

Name Type Description Required
validate_otp object Contains all other elements. ✔️
user object Contains the user element. ✔️
username string The username of the account by which you are recognized in the system ✔️
phone object must be formatted: 5xxxxxxx or 05xxxxxxx ✔️
app_id object , if you have several apps that you want to use this service - use to differentiate the authentication in each application.By default it is 1
code int Number with 6 digit – the code you want to validate for this phone. ✔️
service_type string sms/whatsapp - the default it is sms

# Request Example

json
Copy code
    {
  "validate_otp": {
    "user": {
      "username": "username"
    },
    "phone": "05XXXXXXXX",
    "app_id": "1000",
    "code": "653123",
    "destination_type": "1"
  }
}

  
xml
Copy code
    <?xml version="1.0" encoding="UTF-8"?>
<validate_otp>
    <user>
        <username>username</username>
    </user>
    <phone>05XXXXXXXX</phone>
    <app_id>1000</app_id>
    <code>448431</code>
</validate_otp>

  

# Response Example

json
Copy code
    {
  "status": 0,
  "message": "The code successfully validated"
}


  
xml
Copy code
    <?xml version="1.0" encoding="utf-8"?>
<sms>
    <status>0</status>
    <message>The code successfully validated</message>
</sms>

  

Note

Full description of the response status and message can be found here.

Last Updated: 7/13/2025, 9:35:34 AM