URL: https://api.stringee.com/v1/verify/start
HTTP method: POST
Content-Type: Application/json
Custom HTTP header:
Name: X-STRINGEE-AUTH
Value: JSON web token (JWT), see Authentication
POST data (body):
{
"channel": "voice",
"voice": "banmai",
"number": "84966884770",
"sender_id": "842499966638",
"code_length": 6,
"language": "vi-vn",
"otp_expiry": 300,
"template": "Mã xác thực của bạn là: ${otp}. Xin nhắc lại: ${otp}. Mã xác thực sẽ hết hạn sau ${otp_expiry} giây."
}
| Field | Type | Require | Description |
|---|---|---|---|
| channel | String | YES | Verification channel: voice hoặc sms |
| voice | String | No | Voice name (required if channel = voice) |
| number | String | YES | Phone number in international format |
| sender_id | String | No | Sender ID (required if channel = sms) |
| code_length | Int | No | OTP length (default 6) |
| language | String | No | Language (vi-vn, en-us, ...) |
| otp_expiry | Int | No | OTP expiry time (seconds) |
| template | String | No | OTP template |
Response:
{
"r": 0,
"msg": "pending",
"verification_id": "VEXOPH47SHRAC7TBJOEW47BS02JZETN7J8"
}
URL: https://api.stringee.com/v1/verify/check
HTTP method: POST
Content-Type: Application/json
Custom HTTP header:
Name: X-STRINGEE-AUTH
Value: JSON web token (JWT), see Authentication
POST data (body):
{
"verification_id": "request_id123",
"code": "123",
"number": "84909982669",
"delete": true
}
| Field | Type | Require | Description |
|---|---|---|---|
| verification_id | String | No | Verification ID |
| code | String | YES | OTP code |
| number | String | No | Phone number |
| delete | Boolean | No | Delete OTP after success |
Response:
{
"msg": "Success",
"r": 0
}