Swift and Kotlin libraries for using Fynchat inside your mobile apps.

Two ready-to-use drag-and-drop files:
Fynchat.swift — works on iOS 13 and above (async/await)Fynchat.kt — works on API 24 and aboveBoth support:
CryptoKit and URLSession — no extra dependencieslet fl = Fynchat(apiKey: "fynk_live_xxx")
// free-form text
try await fl.messages.sendText(to: "+966501234567", text: "Hello")
// approved template
try await fl.messages.sendTemplate(
to: "+966501234567",
name: "welcome_offer",
language: "ar",
variables: ["Ahmed", "RAMADAN20"]
)
// create a contact
let contact = try await fl.contacts.create(
phone: "+966501234567",
name: "Ahmed Mohammed",
tags: ["VIP"]
)
let valid = Fynchat.verifyWebhook(
body: rawBody,
signature: signatureHeader,
secret: "whsec_xxx"
)
com.fyntralink.sdkapp/build.gradle:dependencies {
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("org.json:json:20231013")
}
import com.fyntralink.sdk.Fynchat
val fl = Fynchat("fynk_live_xxx")
// The HTTP calls are synchronous — use them inside a Coroutine or Thread
GlobalScope.launch(Dispatchers.IO) {
fl.messages.sendText("+966501234567", "Hello")
fl.messages.sendTemplate(
to = "+966501234567",
name = "welcome_offer",
language = "ar",
variables = listOf("Ahmed", "RAMADAN20")
)
val contact = fl.contacts.create("+966501234567", name = "Ahmed")
}
val valid = Fynchat.verifyWebhook(
body = rawBody,
signature = signatureHeader,
secret = "whsec_xxx"
)
⚠ Don't put the API key directly in the mobile app! Users can extract it.
Alternatives:
messages.send permission plus an IP whitelistPro versions of the SDKs (with ready-made UI components) are available to Enterprise customers. Contact [email protected].
We use essential cookies to run the site. With your permission we also measure usage and ad performance. You can change this anytime. Privacy policy