# 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
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
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.