Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guide iconUser guide
Developer guide iconDeveloper guide
Admin guide iconAdmin guide
English
  • Русский
  • English
Login
    Getting StartedAdministrator documentationFunctional characteristics
      Technology descriptionarrow
    • Architecture OverviewComponent Description
        Deployment schemesarrow
      • Basic schemeFail-safe schemeTypical Placement in Infrastructure
    System requirements
      Admin Panelarrow
      • Account areaarrow
        • Accountsarrow
        • Account UsersAccount Virtual SendersAccount Database Indexes
        TariffsExternal data configurationLDAPTasksSchedule JobsGlobal Stop ListsWebversion Store Policies
        Settingsarrow
      • Databases
          Accessarrow
        • AdminsAPI tokens
        Notifiers
          MTAarrow
        • Default rulesRetry rulesLock rulesBounce patternsStrategiesKeysISPsPools
      Nodes
        Sendersarrow
      • EmailSMSEvent generatorIntegration with SendsayENS: настройка сендера
        Reportsarrow
      • Audit JournalData Usage
        Toolsarrow
      • ARF decoderURL decoderSMID decoderLicense
      Platform installationarrow
    • Automatic installationManual installationRunning the platform in a Docker container
      Platform configurationarrow
    • Configuration fileDomain settingsLDAP access configurationSending Email via SMTP relayPixel and push domain configurationCluster and Replication SetupSystem notifications configurationProcesses UNIX sockets configurationHTTPS ConfigurationMigrating from MongoDB Community Edition to Percona Server for MongoDBAdding sender IP addressesDeduplication request settingsPostgreSQL database for account dataProxy server settingsKeycloak Integration with AltcraftGetting HTTP service statusesConfiguration MongoDB logs rotation
        Configuration of system constants and directoriesarrow
      • Filtering bot actionsDirectory of gender markers
      Platform maintenancearrow
    • Personnel requirementsPlatform maintenance processesPlatform updatingPlatform service monitoringBackup and recoveryTransferring the platform to a new serverCreating, deleting, and populating tables for statistics in ClickHouseUsage of the aktool utilityUsers and directories engaged by the platform
      Custom channels guidearrow
    • OverviewCreating and configuring a channelEntity field configurationTemplate languageEntities
        Pipesarrow
      • Pipe: Basic ConceptsResultErrorsLogPackUnpackHTTP RequestStore SetStore GetSelectorSQLEventerScheduler
        Pipelinesarrow
      • Pipeline: Basic ConceptsMessageScheduleListenerModerateStop
      Extraarrow
    • System page customizationSend Message IDИнструкция по миграции истории в ClickHouseInstructions for migrating history to ClickHouseUtility for importing push subscriptions to Firebase projectUtility for importing push subscriptions to Firebase project
    Processing HTTP/HTTPS traffic
      Administrator APIarrow
      • Accounts admin apiarrow
        • Restricted accessarrow
        • Account Activation and DeactivationAccount Freeze and Unfreeze
        Get accounts listAdd a new accountDelete the account
        Account usersarrow
      • Update an Existing AccountAdd a new accountDelete a userGet a list of usersSending a Welcome Email
        Nodesarrow
      • Synchronize node MTA configurationGet nodes listGet node MTA statusActivate node MTADeactivate node MTA
        Senders admin apiarrow
      • Create or update AKMTA senderGet AKMTA sender informationAssign account to senderGet senders listDelete senderRestore sender
          Sender queuearrow
        • Get sender queue informationHold sender queueRelease sender queueClear sender queue
        Virtual sendersarrow
      • Get virtual senders listGet virtual sender informationCreate virtual senderUpdate virtual senderClone virtual senderDelete virtual sender
    Documentation Archive
  • Extra
  • Utility for importing push subscriptions to Firebase project

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 - 2026 Altcraft, LLC. All rights reserved.