Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v72
  • v74
  • v73
  • v72
Login
  • Getting Started
  • Administrator documentation
  • Functional characteristics
  • Technology description
  • System requirements
  • Admin Panel
  • Platform installation
  • Platform configuration
  • Platform maintenance
  • Custom channels guide
  • Extra
    • System page customization
    • Send Message ID
    • Инструкция по миграции истории в ClickHouse
    • Instructions for migrating history to ClickHouse
    • Utility for importing push subscriptions to Firebase project
    • Utility for importing push subscriptions to Firebase project
  • Processing HTTP/HTTPS traffic
  • Administrator API
This is documentation for Altcraft Platform v72. This documentation is no longer maintained.
The information for up-to-date platform version at this page is available (v74).
  • Extra
  • Utility for importing push subscriptions to Firebase project
Documentation for version v72

Utility for importing push subscriptions to Firebase project

Description​

Utility firebase_import_subs is a tool for importing Web Push subscriptions of a third-party push service into a Firebase project.

How does it work?​

  1. A CSV file is sent as the input data. It contains fields for subsequent matching during the import process and subscription data.
  2. A new CSV file is sent as the output data. All data from the source file is saved in the file, but also the column firebase_push_token is added.

How to do a request?​

  • The Altcraft platform user transfers the CSV file with subscriptions to the platform administrator.
  • You need a service account JSON file. You can get it in the Firebase console: https://firebase.google.com. Go to the settings of the project into which you want to import subscriptions: "Project Settings" → "Service accounts". Go to the "Admin SDK configuration snippet" section and click "Generate new private key" to download the JSON file.

  • Go to the directory where the Altcraft platform is installed. By default, it is /opt/MarketingPlatform/

cd /opt/MarketingPlatform/
  • Use the utility:
ak/bin/firebase_import_subs --in ~/test_firebase_import/in.csv --out ~/test_firebase_import/out.csv --cred_json ~/test_firebase_import/cred.json --auth_field_name web_auth --p256_field_name web_p256 --endpoint_field_name identifier --publ_vapid_key BDkO8iue5By4UcLUk5SCL0LLtDl9RWvSyqr0WOIjiXQTJmwH0yHxcrqidZ-PyJ9QwksTBHkh9wx88YK4xnn17_Y

Parameters​

Required parameters
in
out
cred_json
auth_field_name
p256_field_name
endpoint_field_name
publ_vapid_key
Additional parameters
---
proxy
config

Utility example:​

note

All errors that happened when you start the utility are recorded in the log file.

  • If you've done everything right, the new out.csv contains:
    1. the same data that the initial file contains
    2. column firebase_push_token.

  • Send the resulting csv file to the platform user.

Last updated on Jul 14, 2023
Previous
Utility for importing push subscriptions to Firebase project
Next
Processing HTTP/HTTPS traffic
  • Description
  • How does it work?
  • How to do a request?
    • Parameters
    • Utility example:
© 2015 - 2025 Altcraft, LLC. All rights reserved.