/
v3.0.11Get access

storeFcmToken

Stores the Firebase Cloud Messaging (FCM) token for the current user so the backend can send push notifications to their device. It receives the token from the browser after the user grants notification permission and saves it on the server. It is used when users enable push notifications after login, when the app registers for FCM, and to keep the token updated for delivery.

Request parameters:

NameDescriptionTypeValuesDefault
fcmToken
The Firebase Cloud Messaging tokenstring--
source
Indicates the source of the requeststring--
appType
Specifies the type of applicationstring"all", "belote", etc.-

Call example:

storeFcmToken({
  source: 'web',
  appType: 'all',
  fcmToken: 'fcmToken123456'
})

Response examples:

{
  code: 0,
  rid: 807290571,
  data: {
    result: {
      result: 0,
      details: {
        code: 0,
        data: 'OK'
      }
    },
    result_text: null,
    details: []
  }
}