firebase-admin.instance-id package Stay organized with collections Save and categorize content based on your preferences.
Firebase Instance ID service.
Functions
| Function | Description |
|---|---|
| getInstanceId(app) | Gets theInstanceId service for the default app or a given app.This API is deprecated. Developers are advised to use thegetInstallations() API to delete their instance IDs and Firebase installation IDs.getInstanceId() can be called with no arguments to access the default app'sInstanceId service or asgetInstanceId(app) to access theInstanceId service associated with a specific app. |
Classes
| Class | Description |
|---|---|
| FirebaseInstanceIdError | Firebase instance ID error code structure. This extends FirebaseError. |
| InstanceId | TheInstanceId service enables deleting the Firebase instance IDs associated with Firebase client app instances. |
| InstanceIdClientErrorCode |
getInstanceId(app)
Warning: This API is now obsolete.UsegetInstallations() instead.
Gets theInstanceId service for the default app or a given app.
This API is deprecated. Developers are advised to use thegetInstallations() API to delete their instance IDs and Firebase installation IDs.
getInstanceId() can be called with no arguments to access the default app'sInstanceId service or asgetInstanceId(app) to access theInstanceId service associated with a specific app.
Signature:
exportdeclarefunctiongetInstanceId(app?:App):InstanceId;Parameters
| Parameter | Type | Description |
|---|---|---|
| app | App | Optional app whoseInstanceId service to return. If not provided, the defaultInstanceId service will be returned. |
Returns:
The defaultInstanceId service if no app is provided or theInstanceId service associated with the provided app.
Example 1
// Get the Instance ID service for the default appconstdefaultInstanceId=getInstanceId();Example 2
// Get the Instance ID service for a given appconstotherInstanceId=getInstanceId(otherApp);This API is deprecated. Developers are advised to use theadmin.installations() API to delete their instance IDs and Firebase installation IDs.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-05-21 UTC.