bondify_flutter package brings Bondify’s one-tap Telegram authentication to iOS and Android. Add the PulseButton widget to your widget tree, supply your project ID, and handle the onSuccess callback — that’s the entire client-side integration. The SDK opens Telegram automatically, monitors the session in the background, and delivers a verified PulseUser to your callback once the user confirms. No manual polling, no deep-link setup, no WebView required.
Install
Addbondify_flutter to your pubspec.yaml:
pubspec.yaml
Basic usage
Import the package and dropPulseButton into your widget tree. On a successful authentication, send user.proof to your backend immediately — never use the client-side user object alone to grant access.
login_page.dart
The Flutter SDK opens Telegram automatically and polls the Bondify session in the background using an isolate-safe timer. You do not need to implement any polling loop, handle deep links, or manage session tokens manually — the SDK handles all of that and delivers the result straight to
onSuccess.PulseUser fields
The object passed toonSuccess contains the following fields:
| Field | Type | Description |
|---|---|---|
telegramId | String | The user’s unique Telegram ID — use this as your primary identifier |
name | String | The user’s display name as set in Telegram |
username | String? | The user’s @handle — nullable if they have not set one |
proof | String | Signed JWT to send to your backend for verification |
PulseButton parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | String | ✅ | Your Bondify project ID (starts with proj_) |
onSuccess | void Function(PulseUser) | ✅ | Callback when Telegram auth completes successfully |
onError | void Function(PulseError) | Callback when auth fails or is cancelled by the user | |
text | String | Custom button label (default: "Sign in with Telegram") | |
theme | PulseTheme | PulseTheme.light, PulseTheme.dark, or PulseTheme.auto |
Sending the proof to your backend
After receiving thePulseUser in onSuccess, POST the proof to your server:
session_service.dart
Handling errors
PulseError exposes a message string and a code enum for programmatic handling:
Theming
Match the button to your app’s design:Next steps
Verify proofs in Node.js
Set up
@bondify/server on your backend to validate the proof JWT and issue session tokens.React integration
Add Telegram sign-in to a companion web app using the same project ID.