Overview
The Failover OTP service (Routee ecosystem):
- Sends OTP via the channels you specify in the flow (e.g. Viber and SMS in any order).
- Accepts a single request; it tries the first channel in your flow and, depending on configuration and delivery status, may send the same OTP via the next channel (e.g. when the first reports EXPIRED, FAILED, or UNDELIVERED, or when you enable failover after delivered).
- Lets you track each delivery by tracking ID and optionally receive webhooks when status changes or when failover is sent.
Integration flow
- Get Routee token (auth.routee.net)
- Send OTP – POST /otp/send-failover with a
flow(e.g. ViberOtp then Sms), and optionallycallback.url. - Store the returned flowId (UUID) or trackingId (message token) for tracking (GET /otp/failover/{id}).
- Option A – Poll: Periodically GET /otp/failover/{tracking_id} to get the delivery story.
- Option B – Webhooks: Implement an endpoint that accepts POST requests with the same JSON as GET /otp/failover/{flowId}; on each webhook, update your application from the payload (flowId, status, steps).
- On 401 or 403, refresh the Routee token and retry.
Updated 2 days ago
