Notification Options
Gameball offers multiple ways to deliver notifications to your customers:In-App Notifications
Web ApplicationsBuilt-in notifications for web applications that display within your app interface.
Push Notifications
Mobile AppsPush notifications using Firebase for iOS and Android mobile applications.
Custom Systems
WebhooksBuild your own notification system using SMS, WhatsApp, Amazon SNS, Twilio, or other third-party services via webhooks.
Customer Notifications API
Programmatic AccessRetrieve and display notifications programmatically using the Customer Notifications API.
Mobile Push Notifications (Firebase)
Gameball uses Firebase to deliver push notifications for mobile applications. This includes support for iOS and Android apps.How It Works
1
Configure Firebase
Set up Firebase Cloud Messaging (FCM) and configure it in your Gameball dashboard.
This configuration links your Firebase project with Gameball so notifications can be delivered through Firebase.
2
Register Device Token
Register the device token with Gameball using the SDK’s
registerDevice method.Device tokens are unique identifiers for each mobile device. You need to register them so Gameball knows where to send push notifications.
3
Handle Notifications
Configure your app to handle incoming push notifications and display them appropriately.
Platform-Specific Guides
- iOS
- Android
- React Native
For iOS apps, integrate push notifications by:
Configure AppDelegate
Configure AppDelegate
Inherit required protocols in your
AppDelegate class:Initialize Firebase
Initialize Firebase
Add Firebase configuration in
didFinishLaunchingWithOptions():Request Permissions
Request Permissions
Request notification permissions from the user:
Register Device Token
Register Device Token
Register the device token with Gameball using
gameballApp.registerDevice. Refer to the Firebase documentation for accessing the registration token.Custom Notification Systems via Webhooks
If you have your own notification system—like SMS messaging, WhatsApp bots, or third-party services like Amazon SNS or Twilio—Gameball makes this easy by using webhooks to notify your system whenever a notification needs to be sent.How Webhooks Work
1
Build Webhook Endpoint
Create a webhook endpoint on your server (written in any language like Ruby, PHP, or Node.js) that processes incoming requests.
This endpoint will receive POST requests from Gameball containing notification data.
2
Provide Endpoint URL
Share your endpoint URL (e.g.,
https://yourdomain.com/webhook-endpoint) with Gameball through your dashboard.3
Receive Notifications
Gameball sends a POST request with all necessary notification data to your endpoint whenever a customer should receive a notification.
4
Process and Deliver
Use the notification data to send messages through your preferred channels (SMS, WhatsApp, push, etc.).

Implementation Steps
Step 1: Build a Notifications Endpoint
Create a webhook endpoint on your server:This endpoint will be invoked whenever Gameball needs to send a notification to your customer.
Step 2: Activate Notifications Webhook
In your Gameball dashboard:1
Navigate to Settings
Go to Admin Settings > Account Integration > Webhooks.
2
Add Endpoint URL
Add your notification endpoint URL (e.g.,
www.yourdomain.com/gb-webhook/notification) to the Notification Webhook field.3
Update Webhook
Click Update Webhook to save your configuration.

Step 3: Verify Webhook Signatures
Verify webhook signatures using the SHA1 hash in theX-GB-Signature header:
Step 4: Process Notification Data
The webhook request contains all the data needed to send notifications to your customers. Here’s an example of the notification payload:Webhook Fields
Webhook Fields
The notification webhook includes:
- event: Identifies this as a customer notification push event
- client_id: Your app’s unique identifier
- customer_id: The customer identifier you use in your system
- gb_customer_id: Gameball’s internal customer identifier
- created_at: Timestamp when the notification was created
- data: Array of notification content in different languages (title, body, icon, local)
Implementation Examples
- SMS Integration
- WhatsApp Integration
- Push Notifications (AWS SNS)
- Multiple Channels
Send notifications via SMS using your SMS gateway:
Customer Notifications API
Gameball also provides APIs to retrieve and manage customer notifications programmatically.Retrieving Notifications
Use the Get Customer Notifications API to fetch a list of notifications for a specific customer:Pagination
Use
count and hasMore fields to implement pagination in your UI.- count: Number of notifications in current response
- hasMore: Indicates if more notifications are available
Language Support
Request notifications in different languages using the
lang query parameter.Example: ?lang=es for SpanishMarking Notifications as Read
Use the Mark Notifications as Read API to update notification status:Get Notification Count
Use the Get Customer Notifications Count API to get the total count without fetching all records:Best Practices
Verify Webhooks
Always verify webhook signatures to ensure requests are legitimate and secure.
Handle Errors Gracefully
Implement proper error handling for failed notification deliveries.
Store Device Tokens
For push notifications, securely store device tokens in your database and update them when they refresh.
Respect User Preferences
Allow customers to opt-in or opt-out of different notification types.
Related Resources
Notification Webhooks
Complete webhook documentation for notifications
Customer Notifications API
API reference for retrieving customer notifications
Build Custom UI
Guide on displaying notifications in your custom UI
iOS Push Notifications
iOS-specific push notification integration guide