v1
latestOpenAPI 3.0.22026-07-2432112226.7 KBSandbox - SMS OTP
Sandbox - Send OTP V2
SMS OTP version change is by introducing a new API version release.<br>
Version changes usually need to be applied immediately to the latest version, in order to get a better API usage experience than the previous version.<br>
The benefits you get if you use a newer version are as follows.
- Decreasing processing time in API Request and Response
- Improve feature in SMS: Blocking Request, Spam Check, Sequential Phone Number, and Blocked Numbers
- Increase RPS in SMS (before 30rps to 50rps)
- Better developer environment to support future developments
- Improve logging and monitoring on our side
- Improved dependencies and improved service stability<br>
This method helps you to generate and send sms containing one-time password to destination number<br>
The following table describes the msisdn option to be used as an input<br>
| Msisdn | Description | Response |
|---|---|---|
| 6282123060001 | Valid Phone number | 201 "OTP sent successfully" |
| 6282123060002 | Msisdn invalid | 400 "Msisdn invalid: msisdn length should between 4-16 characters" |
| 6282123060003 | Invalid Header | 401 "Authorization failed" |
| 6282123060004 | Insufficient Quota | 403 "OTP testing quota is insufficient" |
| 6282123060005 | Blocked Msisdn | 409 "Msisdn invalid: msisdn has been blocked" |
| 6282123060006 | Too Many Request | 429 "Too many request in the allowed time frame" |
post/v2/otp/send/sandbox
Headers
app-idstring required
api-keystring required
Request body
Example request
{
"msisdn": "6282123060001",
"template": "This is your Verihubs OTP $OTP.",
"otp": "234123",
"time_limit": "300",
"challenge": "update_account",
"callback_url": "https://your-url-callback.com"
}Response
Successful Request
Example response
{
"message": "OTP sent successfully",
"otp": "234123",
"msisdn": "6282123060001",
"session_id": "adwaww-wdwa-fegr-wrwr",
"try_count": 2,
"segment_count": 2
}