Go to console

The Firebase Messaging service interface.

Do not call this constructor directly. Instead, use firebase.messaging().

See Set Up a JavaScript Firebase Cloud Messaging Client App for a full guide on how to use the Firebase Messaging service.




  • deleteToken(token: string): Promise<boolean>
  • To forceably stop a registration token from being used, delete it by calling this method.


    • token: string

      The token to delete.

    Returns Promise<boolean>

    The promise resolves when the token has been successfully deleted.


  • getToken(): Promise<string | null>
  • After calling requestPermission() you can call this method to get an FCM registration token that can be used to send push messages to this user.

    Returns Promise<string | null>