Stay organized with collections
Save and categorize content based on your preferences.
Methods
delete
- delete
(
)
:
Promise
<
void
>
-
Returns Promise<void>
getId
- getId
(
)
:
Promise
<
string
>
-
Returns Promise<string>
Firebase Installation ID
onIdChange
- onIdChange
(
callback
:
(
installationId
:
string
)
=>
void
)
:
(
)
=>
void
-
Parameters
-
callback: (installationId: string) => void
-
- (installationId: string): void
Returns () => void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-27 UTC.
[null,null,["Last updated 2022-07-27 UTC."],[],[],null,["# Installations | JavaScript SDK\n\n- [firebase](/docs/reference/js/v8/firebase).\n- [installations](/docs/reference/js/v8/firebase.installations).\n- Installations\n==============================================================================================================================\n\nThe Firebase Installations service interface.\n\nDo not call this constructor directly. Instead, use\n[`firebase.installations()`](/docs/reference/js/v8/firebase.installations).\n\nIndex\n-----\n\n### Properties\n\n- [app](/docs/reference/js/v8/firebase.installations.Installations#app)\n\n### Methods\n\n- [delete](/docs/reference/js/v8/firebase.installations.Installations#delete)\n- [getId](/docs/reference/js/v8/firebase.installations.Installations#getid)\n- [getToken](/docs/reference/js/v8/firebase.installations.Installations#gettoken)\n- [onIdChange](/docs/reference/js/v8/firebase.installations.Installations#onidchange)\n\nProperties\n----------\n\n### app\n\napp: [App](/docs/reference/js/v8/firebase.app.App) \nThe [app](/docs/reference/js/v8/firebase.app.App) associated with the `Installations` service\ninstance.\n\nexample\n:\n\n var app = analytics.app;\n\n\nMethods\n-------\n\n### delete\n\n- delete ( ) : Promise \\\u003c void \\\u003e\n- Deletes the Firebase Installation and all associated data.\n\n #### Returns Promise\\\u003cvoid\\\u003e\n\n### getId\n\n- getId ( ) : Promise \\\u003c string \\\u003e\n- Creates a Firebase Installation if there isn't one for the app and\n returns the Installation ID.\n\n #### Returns Promise\\\u003cstring\\\u003e\n\n Firebase Installation ID\n\n### getToken\n\n- getToken ( forceRefresh ? : boolean ) : Promise \\\u003c string \\\u003e\n- Returns an Authentication Token for the current Firebase Installation.\n\n #### Parameters\n\n -\n\n ##### Optional forceRefresh: boolean\n\n #### Returns Promise\\\u003cstring\\\u003e\n\n Firebase Installation Authentication Token\n\n### onIdChange\n\n- onIdChange ( callback : ( installationId : string ) =\\\u003e void ) : ( ) =\\\u003e void\n- Sets a new callback that will get called when Installlation ID changes.\n Returns an unsubscribe function that will remove the callback when called.\n\n #### Parameters\n\n -\n\n ##### callback: (installationId: string) =\\\u003e void\n\n -\n - (installationId: string): void\n\n \u003c!-- --\u003e\n\n -\n\n #### Parameters\n\n -\n\n ##### installationId: string\n\n #### Returns void\n\n #### Returns () =\\\u003e void\n\n -\n - (): void\n\n \u003c!-- --\u003e\n\n -\n\n #### Returns void"]]
The Firebase Installations service interface.
Do not call this constructor directly. Instead, use
firebase.installations()
.