# Api OTP
# Send otp
# Description
You can use this API to send otp code.
# Endpoint
POST https://019sms.co.il/api
# Parameters
Name | Type | Description | Required |
---|---|---|---|
send_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 | int | Must be formatted: 5xxxxxxx or 05xxxxxxx | ✔️ |
app_id | int | If you have several applications that you want to use with this service - use to differentiate the authentication in each application. By default it is 1 | ➖ |
source | string | The source number of the SMS, meaning the number that will appear as the sender. | ✔️ |
max_tries | int | A number between 3-5. which means how many attempts you can make on the code. By default it is 3 | ➖ |
valid_time | int | A number between 1-15. That means how many minutes the code will be available. By default it is 5 | ➖ |
text | string | Custom text – must contains '[code]' in which the real code will appear in the message for the destination. (if not send the default is : ' the code is [code]') | ➖ |
# Request Example
xml
Copy code
# Response Example
xml
Copy code
Note
Full description of the response status and message can be found in here:
# 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. | ✔️ |
# Request Example
xml
Copy code
# Response Example
xml
Copy code
Note
Full description of the response status and message can be found in here:
← Verify phone Examples →