Vonage (Nexmo) SDK Integration for Communication in Mobile Application
Vonage (formerly Nexmo, after Ericsson acquisition renamed Vonage, now part of Ericsson) provides several independent mobile SDKs: Vonage Client SDK for In-App Voice and Messaging, Vonage Video API (ex-TokBox OpenTok) for video, and separate REST APIs for SMS/WhatsApp. Important not to confuse these products — different billing, different SDKs, different documentation.
Vonage Client SDK: Voice Calls
Vonage Client SDK for voice built over WebRTC but provides high-level API with JWT authentication and integration with Vonage Voice API.
JWT generation on backend:
import jwt, time
payload = {
"application_id": VONAGE_APP_ID,
"iat": int(time.time()),
"exp": int(time.time()) + 3600,
"sub": user_id,
"acl": {
"paths": {
"/*/users/**": {},
"/*/conversations/**": {},
"/*/legs/**": {}
}
}
}
token = jwt.encode(payload, private_key, algorithm="RS256")
Vonage uses RSA-signed JWT, not HMAC. Private key generated on Vonage Application creation in Dashboard — this .key file must be stored on server, not mobile app.
Android SDK:
// build.gradle
implementation 'com.vonage:client-sdk-android:8.x.x'
// Initialization
val client = VonageClient.Builder(context)
.build()
client.setConnectionListener { connectionStatus, connectionStatusReason ->
// CONNECTED, DISCONNECTED, etc.
}
// Login with JWT
client.login(jwt) { loginResult ->
when (loginResult) {
is LoginResult.Success -> { /* ready for calls */ }
is LoginResult.Failure -> { /* handle error */ }
}
}
Outgoing call via PSTN (to phone number) or In-App (to another app user):
// call another app user
client.call(callee_user_name, CallType.InApp, callListener)
iOS SDK — similar structure, VGClient:
VGClient.setLogger(VGClientLogger(level: .info))
let config = VGClientConfig(region: .US)
VGClient.shared.configure(config)
VGClient.shared.login(withJWT: jwt) { error in }
Incoming calls via push — VoIP PushKit for iOS, FCM for Android. Vonage Dashboard configures Delivery Channel with APNs certificates / FCM key.
Vonage Video API (OpenTok)
If task is video calls or video conferences, Vonage Video API (OpenTok) — separate product with richer functionality: screen sharing, recording, broadcast, signaling via built-in channels.
// Android OpenTok SDK
implementation 'com.vonage:client-sdk-video:x.x.x'
val session = Session.Builder(context, API_KEY, sessionId).build()
session.setSessionListener(sessionListener)
session.connect(token)
val publisher = Publisher.Builder(context).build()
session.publish(publisher)
Session created on server via REST API, client gets sessionId and token. Model similar to Twilio Video.
Vonage SMS and WhatsApp Business
SMS via Vonage REST API — simplest scenario, SDK not needed:
POST https://rest.nexmo.com/sms/json
api_key=xxx&api_secret=yyy&from=Vonage&to=79001234567&text=Hello
WhatsApp Business via Vonage Messages API — requires approved template from Meta for first message (outbound), any user reply opens 24-hour window for free messaging.
Comparison with Twilio
| Criterion | Vonage | Twilio |
|---|---|---|
| iOS/Android SDK Maturity | Sufficient, rare updates | Good, active support |
| PSTN Coverage | Strong in Europe | Strong in US, good globally |
| Video API | OpenTok — mature | Twilio Video — actively developed |
| Documentation | Worse than Twilio | Among best in industry |
| Voice Cost | Comparable to Twilio |
Main practical disadvantage of Vonage Client SDK — documentation. Versions 7.x and 8.x have incompatible APIs, migration guide incomplete. Several times had to parse SDK changelog to understand why callbacks stopped working after dependency update.
What's Included
Create and configure Vonage Application, generate RSA key pair, implement backend for JWT, integrate Client SDK or Video API on Android/iOS, setup push for incoming calls, test on real devices.
Timeline: 1–3 weeks depending on required functionality (voice only or full communication platform).







