06 · otp
OTP code: verify identity
Two calls to prove the customer's number before any sensitive data. The bot requires a verified OTP before these tools.
- POST session/otp/request { botId, sessionId, msisdn }, then session/otp/verify { …, code } (4 to 8 digits).
- In demo without an SMS provider, the code comes back in debugCode (123456 in mock mode).
- Enable “OTP code required” in Developer > Access & security to protect sensitive actions.
OTP — request the code (cURL)
curl -X POST https://api.votredomaine.com/api/v1/re-act-agent/session/otp/request \
-H "Content-Type: application/json" \
-d '{
"botId": "VOTRE_BOT_ID",
"sessionId": "client-42-session-1",
"msisdn": "0700000000"
}'
// → { "sent": true, "via": "mock", "ttlSec": 300, "debugCode": "123456" }OTP — verify the code (cURL)
curl -X POST https://api.votredomaine.com/api/v1/re-act-agent/session/otp/verify \
-H "Content-Type: application/json" \
-d '{
"botId": "VOTRE_BOT_ID",
"sessionId": "client-42-session-1",
"msisdn": "0700000000",
"code": "123456"
}'