Viber Business Messages Integration in Mobile Application
Viber Business Messages — official business communication channel in Viber. Not regular Viber bot: Business Messages — verified account with branding, transactional and promo messages via PA (Public Account) API. Audience relevant especially for Ukraine, Belarus, and other CIS countries.
How Viber PA API Works
Viber doesn't give direct REST API to developers without intermediary. Send either via Rakuten Viber Partner (direct access — large businesses with contract only) or authorized aggregators: Infobip, SMSC, MessageBird, TurboSMS, others. Aggregator provides REST API, internally calls Viber.
Request via Infobip:
POST https://api.infobip.com/viber/1/message/bulk
Authorization: App {API_KEY}
Content-Type: application/json
{
"bulkId": "bulk-campaign-2024-03",
"messages": [
{
"from": "YourBrandName",
"destinations": [{ "to": "380991234567" }],
"viber": {
"text": "Your order #98765 sent for delivery. Expect today 2:00 PM – 6:00 PM.",
"imageUrl": "https://cdn.yourbrand.com/delivery-banner.jpg",
"buttonText": "Track Order",
"buttonUrl": "https://yourbrand.com/track/98765"
}
}
]
}
Rich messages (with image and button) — transactional only. Promo with buttons need separate Viber approval.
Mobile Part: What to Build
App doesn't work with Viber SDK directly — calls your backend sending via aggregator. Mobile side:
- Form for Viber message creation with Rich Media (image upload, button, text).
- Message preview before send.
- Launch broadcast and status tracking.
// Android — create Viber message
data class ViberMessage(
val recipientPhone: String,
val text: String,
val imageUrl: String? = null,
val buttonText: String? = null,
val buttonUrl: String? = null
)
suspend fun sendViberMessage(message: ViberMessage): MessageResult {
return apiClient.post("/notifications/viber", message)
}
Delivery Statuses and SMS Fallback
Key Viber Business feature: if user has no Viber or unavailable — auto-fallback to SMS. Configured at aggregator level:
{
"messages": [{
"viber": { "text": "...", "validityPeriod": 15 },
"sms": { "text": "Short SMS version of message" }
}]
}
validityPeriod — minutes to wait for Viber delivery before switching to SMS. After send, aggregator webhooks with final status: DELIVERED_TO_VIBER, DELIVERED_TO_SMS, UNDELIVERABLE.
Backend processes webhooks, stores statuses. Mobile requests aggregated stats:
struct ViberCampaignStats: Decodable {
let total: Int
let deliveredViber: Int
let deliveredSms: Int
let failed: Int
let pending: Int
}
Verification and PA Registration
Before development — register Public Account in Viber. Process: application via partner → brand verification → get pa_token. Takes days to weeks. Plan for this timeline.
Timeline
Viber Business Messages integration via aggregator (Infobip or similar), mobile UI with Rich message preview, delivery status and fallback handling — 4–7 workdays (not including PA verification time).







