Verify OTP
POST
/sms-api/otp/verifyChecks a code the user typed against the one sent for that requestId and phone number. After five wrong attempts the code is discarded and a new one must be sent.
Parameters
requestIdstringrequiredFrom the Send OTP response.
phoneNumberstringrequiredThe number the code was sent to.
codestringrequiredThe digits the user entered.
| Field | Type | Required | Description |
|---|---|---|---|
requestId | string | required | From the Send OTP response. |
phoneNumber | string | required | The number the code was sent to. |
code | string | required | The digits the user entered. |
Errors
- 422Invalid OTP
- 404OTP not found or expired
Request
curl -X POST "https://api.bulkclix.com/api/v1/sms-api/otp/verify" \ -H "x-api-key: YOUR_API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "requestId": "2d7e6f5a-9b8c-4d1e-a2f3-4b5c6d7e8f9a", "phoneNumber": "0241234567", "code": "482913" }'
Response · 200
application/json
{ "message": "OTP verification successful", "data": { "phoneNumber": "233241234567", "code": 482913, "prefix": "Kx4Q", "requestId": "2d7e6f5a-9b8c-4d1e-a2f3-4b5c6d7e8f9a" } }