Verify OTP API
After the OTP is sent to the device, the device will announce 4 digits. The user enters these digits to verify and complete the pairing.
API Endpoint
POST
https://speaker-api.sepay.vn/devices/v1/speaker/pair/verifyRequest Parameters
hardwareIdstringrequired
Device serial number
session_idstringrequired
Session ID from /speaker/pair/request API
otpstringrequired
4-digit OTP code read by the device
Note
- Session ID is valid for approximately 2 minutes
- OTP consists of 4 digits announced by the device
- After successful verification, the device will be paired and ready to receive notifications
Code Examples
>
>
>
>
>
curl --request POST \--url https://speaker-api.sepay.vn/devices/v1/speaker/pair/verify \--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \--header 'content-type: application/json' \--data '{"hardwareId":"VNS52508000001","session_id":"8b9f6d2a-3c1b-4f7a-a7d4-123456789abc","otp":"1234"}'
API Response
Response 200 - Pairing successful
{
"code": 200,
"message": "Liên kết thành công",
"data": {
"hardwareId": "VNS52508000001",
"model": "S5 Plus",
"isPaired": true,
"pairedTime": "2025-05-23 16:06:38"
}
}codeinteger
Response code
messagestring
Result description
dataobject