> For the complete documentation index, see [llms.txt](https://help.smartico.ai/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.smartico.ai/welcome/technical-guides/front-end-integration/push-configurations.md).

# Push configurations

Follow the instruction to get details for the Push notifications from Firebase console

1. Go to <https://firebase.google.com/>
2. Log in and navigate to the console
3. Create a new project<br>

   <figure><img src="https://77049817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfS5hl0PiysHtKAKMsQTe%2Fuploads%2Fgit-blob-1b56f846346611f6d6dc40dd306760cc2f4d5cdb%2F1.jpg?alt=media" alt="" width="563"><figcaption></figcaption></figure>

4\. In the new project navigate to “Project settings”

<figure><img src="https://77049817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfS5hl0PiysHtKAKMsQTe%2Fuploads%2Fgit-blob-6346fe8c3edde31d1c0a1f6d21371131f5dfe1f5%2F2.png?alt=media" alt=""><figcaption></figcaption></figure>

5\. In the General tab, create a new Web App and copy the content of the "Config" section

<figure><img src="https://77049817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfS5hl0PiysHtKAKMsQTe%2Fuploads%2Fgit-blob-91936396340be3fda4f585e2ad07daa65e4440bc%2F3.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://77049817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfS5hl0PiysHtKAKMsQTe%2Fuploads%2Fgit-blob-2b0f0a2694c6df6263138b0737df1e747cf11070%2F4.png?alt=media" alt="" width="462"><figcaption></figcaption></figure>

6\. Navigate to “Service accounts” and generate a new private key

<figure><img src="https://77049817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfS5hl0PiysHtKAKMsQTe%2Fuploads%2Fgit-blob-0b3ea893a5306dbf877e93a86cea70006f44beaa%2F5.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

7\. Download the file with the private key

8\. Provide the Config file content from step 5 and the private key from step 7 to Smartico support personnel. You can also place them yourself in the Label settings in Smartico BackOffice; there are 2 settings to place (in JSON format):

a) **Firebase web app config for push notifications** - configuration from step 5

b) **Firebase / Huawei server keys for push notifications** - configuration from step 7.

<div data-with-frame="true"><figure><img src="https://77049817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfS5hl0PiysHtKAKMsQTe%2Fuploads%2FQiognzVYJvm7KKYnK19k%2Fimage.png?alt=media&amp;token=a8499b2a-eea4-4fc2-9aa7-9abc111b8859" alt=""><figcaption></figcaption></figure></div>

The "server configuration" has the following form:

```json
{
    "type": "service_account",
    "project_id": "btg-demo",
    "private_key_id": "07ec....40",
    "private_key": "-----BEGIN PRIVATE KEY-----\n....\n-----END PRIVATE KEY-----\n",
    "client_email": "firebase-adminsdk-....@...com",
    "client_id": "105962....093962",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://oauth2.googleapis.com/token",
    "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
    "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-admins...."
}
```

There are additional keys that you can place in the configuration to control parameters of the push messages; an example of the structure:

```json
{
  "apns_default_sound": true,
  "ttl": 86400
}
```

| `apns_default_sound` | `true`  | Plays the system default alert sound when the notification is received on iOS. When set to `false`, the notification appears without sound.                                                                                      |
| -------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ttl`                | `86400` | When a web push notification is sent, it remains in the user's notification tray for a certain period. If a TTL of 86400 seconds is configured (one day), the notification would automatically expire and disappear after a day. |

## Huawei phones (HMS Push Kit)

Huawei phones without Google services cannot receive Firebase pushes. Smartico sends pushes to them through Huawei Push Kit (HMS), from the same campaigns and Push assets.

{% hint style="info" %}
Supported: Huawei phones on EMUI and HarmonyOS 2–4 (the Android-based versions with HMS Core). HarmonyOS NEXT (HarmonyOS 5 and later) is not supported.
{% endhint %}

1. In Huawei AppGallery Connect, open your project and turn on **Push Kit** for your app.
2. Open **Project settings → General information**. In the **App information** area, copy the **Client ID** and the **Client secret** of your app.
3. Add a Huawei entry to the **Firebase / Huawei server keys for push notifications** setting in **Label settings** (or send the Client ID and Client secret to Smartico support personnel).
4. Ask your Success Manager to turn on the **Show Huawei fields in Push assets** setting. While it is off, Smartico does not send pushes to Huawei phones.
5. Make your app register its Huawei push tokens with platform `12`, as described in [Registering tokens for push notifications over API](https://help.smartico.ai/welcome/technical-guides/front-end-integration/ios-android-clients-integration-guide).

If your label sends pushes only to Huawei apps, the whole setting can be the Huawei entry:

```json
{
  "gateway-type": "harmony_v1",
  "client_id": "your_client_id",
  "client_secret": "your_client_secret"
}
```

If your label also sends Firebase pushes, give each entry its own key, and put the Firebase private key JSON from step 7 under `default`:

```json
{
  "com.mycasino.huawei": {
    "gateway-type": "harmony_v1",
    "client_id": "your_client_id",
    "client_secret": "your_client_secret",
    "ttl": 86400,
    "default_sound": true
  },
  "default": {
    // the Firebase private key JSON from step 7
    "type": "service_account",
    "project_id": "btg-demo",
    ...
  }
}
```

The app must send this key as `app_package_id` when it registers a Huawei token. The key does not have to be the real package name of the app; it only has to match. If no key matches, Smartico uses the `default` entry, and a push to a Huawei token fails when that entry is a Firebase key. One key cannot hold both a Firebase and a Huawei entry.

| Key             | Example              | Description                                                                                                                                    |
| --------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `gateway-type`  | `harmony_v1`         | Required. Marks the entry as Huawei Push Kit. `gateway_type` also works. Without it, pushes to Huawei phones fail.                             |
| `client_id`     | `your_client_id`     | Required. The Client ID from AppGallery Connect.                                                                                               |
| `client_secret` | `your_client_secret` | Required. The Client secret from AppGallery Connect. Keep it secret.                                                                           |
| `ttl`           | `86400`              | Optional. How long, in seconds, Huawei keeps the push while the phone is offline. The maximum is 15 days (1296000); a bigger value is ignored. |
| `default_sound` | `true`               | Optional. `true` plays the phone's default notification sound.                                                                                 |

Huawei pushes show the title, the message and the attached image of the Push asset (the image link must start with `https://`). Buttons, the icon and the badge image are not used. What happens when the player taps the push is set by the **Huawei action type** and **Huawei deep link or URL** fields of the Push asset; see [Push notifications](https://help.smartico.ai/welcome/products/crm-automation/communication-channels/how-to-create-a-push-resource).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.smartico.ai/welcome/technical-guides/front-end-integration/push-configurations.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
