Migration from OneSignal
Step 1. Get VAPID keys from OneSignal service
Skip the step if you are migrating subscriptions configured for the Safari browser.
Request the keys from OneSignal technical support. Both private and public keys are required .
VAPID keys and Application Server keys are the same thing.
Step 2. Import the VAPID keys into your Firebase project
Skip the step if you are migrating subscriptions configured for the Safari browser.
Go to project settings in Firebase and go to the Cloud Messaging tab. At the bottom of the page, you will see the Web Configuration section. Here you can generate keys yourself, but we do not need this, since you have already received VAPID keys from your service. Click "import an existing key pair" at the very bottom of the section.

In the new window enter Public key and Private key that you've got from OneSignal technical support.

Step 3. Configure the resource
For information on configuring a resource for Web push notifications, see Web push: settings and implementation.
Please note that resource settings differ from browser to browser.
Step 4. Export subscriptions
Exporting subscriptions involves creating a CSV file that contains all of your current user data.
Use the Curl utility to make a POST request. The request will generate a URL that to can use to download a compressed CSV file (.csv .gz).
The file may take several minutes to generate depending on the number of users in your app.
You can test if it is complete by making a GET request to the csv_file_url value.
If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned.
Below is an example of the request that can be run in the terminal.
curl -X POST -H "Authorization: Basic YOUR_REST_API_KEY" -H "Content-Type: application/json" -d '{
"extra_fields": ["web_auth", "web_p256"],
"last_active_since": "1469392779", "segment_name": "Active Users"
}' "https://onesignal.com/api/v1/players/csv_export?app_id=YOUR_APP_ID"
The request requires your OneSignal App's REST_API_Key and APP_ID. You can find this data on the OneSignal service. Go to Settings and then - to the Keys & IDs tab.

The following parameters must be passed in the request body:
| Field | Description |
|---|---|
| "extra_fields" | Additional fields that you wish to include. Currently supports location, country, rooted, notification_types, ip, external_user_id, web_auth, and web_p256.In our case, you must specify web_auth and web_p256. |
| "last_active_since" | Export all devices with a last_active timestamp greater than this time. |
| "segment_name" | Export all devices belong to the segment You can use this field to export only the segments you are interested in. More details about segments in OneSignal: https://documentation.onesignal.com/docs/segmentation. |
You can get more information on exporting subscriptions from OneSignal here: https://documentation.onesignal.com/reference/csv-export.
Step 5. Provide the csv file with these fields to the administrator or Altcraft support service
Skip the step if you are migrating subscriptions configured for the Safari browser.
If the Altcraft platform is deployed inside your business (On-Premise solution), transfer the generated csv file with subscriptions to the platform administrator.
If the platform is installed on the cloud (SaaS solution), transfer the csv file to Altcraft support.
Step 6. Take the processed csv file from the administrator
Skip the step if you are migrating subscriptions configured for the Safari browser.