Skip to main content
With the Pela Talqui (Through Talqui) mode, Talqui sends the push through your Firebase project. Notifications show your app’s name and icon, and they reach iOS and Android through Firebase Cloud Messaging (FCM). You need:
  • the Talqui SDK for React Native or Flutter, version 0.2.0 or later;
  • Firebase Cloud Messaging set up in your app (React Native Firebase or FlutterFire);
  • for iOS, your APNs authentication key uploaded to your Firebase project (Project settings → Cloud Messaging).

1. Create a service account

Talqui sends with a service account key of your Firebase project, restricted to sending notifications.
  1. In the Google Cloud console, select your Firebase project and open IAM & Admin → Service accounts.
  2. Create service account, name it (for example talqui-push) and give it the role Firebase Cloud Messaging API Admin. No other role is needed.
  3. Open the account, go to Keys → Add key → Create new key → JSON. A .json file downloads.
Upload the service account key, a JSON with "type": "service_account" and a private_key. The google-services.json and GoogleService-Info.plist files of your app are something else and are refused.

2. Upload it to Talqui

  1. In app.talqui.chat, open Plugins → WebChat, open the connection and go to the Notificações (Notifications) tab.
  2. Under Como avisar (How to notify), choose Pela Talqui (Through Talqui).
  3. In Aplicativo (Firebase) (App), click Enviar chave JSON (Upload JSON key) and pick the file.
Talqui checks the key with Google before saving it. Once saved, only the project ID and the service account email are shown: the key is stored encrypted and never comes back through the screen or the API. To change it, upload a new one.

3. Hand the device token to the SDK

Pass the FCM token to the SDK and keep it fresh. Then open the chat when the user taps a Talqui notification.
handlePush opens the chat and returns true for a Talqui notification, and does nothing for yours, so you can call it for every tap. The token is linked to the visitor once the chat loads, and logout() unlinks it, so the next person on the phone never gets the previous user’s replies.
React Native Firebase needs native code, so push notifications don’t work in Expo Go: use a development build. The chat itself still works in Expo Go.

4. Test it

  1. Open the chat in your app and send a message.
  2. Send the app to the background (or lock the phone).
  3. Reply from your Talqui inbox.
  4. About 20 seconds later the notification arrives. Tap it: the chat opens.
The Últimos avisos (Last deliveries) table on the Notifications tab shows each attempt with the channel App (Firebase).

When the app is open

Talqui only notifies a user who isn’t looking at the chat. If the app is open on another screen, the push still arrives. On Android, FCM hands it to your foreground handler instead of showing it: tell it apart from your own pushes with isTalquiPush and show your own banner, or update the unread badge.

What the push carries

Troubleshooting