Step 2: OneSignal Configuration
OneSignal is the push notification service used to send real-time alerts to your mobile app users. This guide will walk you through setting up OneSignal for both iOS and Android platforms.
Create OneSignal App
Step 1: Sign Up or Log In
- Go to https://onesignal.com
- Sign up for a free account or log in if you already have one
- Click "New App/Website" button
Step 2: Create New App
- Enter your App Name (e.g., "WhautoChat Business")
- Select Mobile App as the platform
- Click "Create"
iOS Configuration (Apple Push Notification Service)
Step 1: Generate APNs Auth Key
You need to create an APNs (Apple Push Notification service) authentication key in your Apple Developer account.
- Log in to Apple Developer Portal
- Go to Certificates, Identifiers & Profiles
- Click Keys in the sidebar
- Click the + button to create a new key
- Enter a Key Name (e.g., "WhautoChat Push Notifications")
- Check Apple Push Notifications service (APNs)
- Click Continue, then Register
- Download the .p8 file (you can only download this once!)
- Note the Key ID (10-character string)
- Note your Team ID (found in the top right of the developer portal)
The .p8 key file can only be downloaded once. Store it securely. If you lose it, you'll need to create a new key.
Step 2: Configure iOS in OneSignal
- In your OneSignal app dashboard, go to Settings → Platforms
- Click Apple iOS (APNs)
- Select ".p8 Key" as the authentication method
- Upload your .p8 file
- Enter your Key ID
- Enter your Team ID
- Enter your Bundle ID (e.g.,
chat.whauto.app) - Click Save
Android Configuration (Firebase Cloud Messaging)
Step 1: Create Firebase Project
- Go to Firebase Console
- Click "Add project" or "Create a project"
- Enter your Project name (e.g., "WhautoChat Business")
- Disable Google Analytics (optional, not needed for push notifications)
- Click "Create project"
Step 2: Add Android App to Firebase
- In your Firebase project, click the Android icon to add an Android app
- Enter your Android package name (same as your Bundle ID, e.g.,
chat.whauto.app) - Enter App nickname (optional, e.g., "WhautoChat Android")
- Leave Debug signing certificate SHA-1 empty for now
- Click "Register app"
- Download the
google-services.jsonfile - Click Continue and Finish
Step 3: Get Firebase Server Key
- In Firebase Console, click the gear icon → Project settings
- Go to the Cloud Messaging tab
- Under Cloud Messaging API (Legacy), find your Server key
- Copy the Server key (starts with "AAAA...")
If you don't see the Server key, you may need to enable the Cloud Messaging API (Legacy) in Google Cloud Console.
Step 4: Configure Android in OneSignal
- In your OneSignal app dashboard, go to Settings → Platforms
- Click Google Android (FCM)
- Paste your Firebase Server Key
- Click Save
Verify Configuration
Test iOS Push Notifications
- In OneSignal dashboard, go to Messages → New Push
- Enter a test message
- Under Audience, select Test Users or Subscribed Users
- Select iOS as the platform
- Click Send Message
Test Android Push Notifications
- In OneSignal dashboard, go to Messages → New Push
- Enter a test message
- Under Audience, select Test Users or Subscribed Users
- Select Android as the platform
- Click Send Message
You'll be able to fully test push notifications after your app is built and installed on a device. These steps are for later verification.
Configure Server Environment Variables
After obtaining your OneSignal credentials, you need to configure them in your WhautoChat server installation.
Step 1: Get OneSignal App ID and API Key
- In OneSignal dashboard, go to Settings → Keys & IDs
- Copy your OneSignal App ID (format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) - Copy your REST API Key (this will be used as
ONE_SIGNAL_API_KEY)
Step 2: Update web-server.env File
- Navigate to your WhautoChat installation directory on your server
- Open the
web-server.envfile - Add or update the following environment variables:
ONE_SIGNAL_APP_ID=your-onesignal-app-id
ONE_SIGNAL_API_KEY=your-onesignal-rest-api-key
- Save the file
Step 3: Restart the Server
After updating the environment variables, restart your WhautoChat server for the changes to take effect:
docker-compose restart
Make sure to configure these environment variables before running the installation. If you haven't installed WhautoChat yet, refer to the Installation Guide for complete setup instructions.
Required Information for WhautoChat
Please provide the following information to WhautoChat for app build:
OneSignal App ID
- In OneSignal dashboard, go to Settings → Keys & IDs
- Copy your OneSignal App ID (format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
iOS Configuration
- APNs .p8 Key file
- Key ID
- Team ID
- Bundle ID
Android Configuration
- Firebase
google-services.jsonfile - Firebase Server Key
- Android Package Name
Configuration Checklist
Before proceeding, ensure you have:
- Created OneSignal account and app
- Generated APNs .p8 key from Apple Developer Portal
- Configured iOS platform in OneSignal
- Created Firebase project
- Added Android app to Firebase
- Downloaded
google-services.jsonfile - Obtained Firebase Server Key
- Configured Android platform in OneSignal
- Noted your OneSignal App ID
- Prepared all files and credentials for WhautoChat
Common Issues
iOS: "Invalid APNs Certificate"
Solution: Ensure you're using the correct Bundle ID and that your .p8 key has APNs enabled.
Android: "Invalid Server Key"
Solution: Make sure you copied the complete Server Key from Firebase Cloud Messaging settings.
"No devices subscribed"
Solution: This is normal before the app is built and installed. Devices will appear after users install and open the app.
Next Steps
Once you have completed the OneSignal configuration:
- Proceed to Apple Configuration for iOS certificates and provisioning
- Continue with Google Configuration for Android app signing
- Submit all credentials to WhautoChat for app build