Firebase Admin Java SDK Release Notes

To review release notes for the Firebase console and for other Firebase platforms and related SDKs, refer to the Firebase Release Notes.

Version 9.4.1 - 15 October, 2024

  • Removed the mockserver-junit-rule-no-dependencies dependency that was incorrectly scoped.

Version 9.4.0 - 09 October, 2024

  • Added HTTP/2 enabled transport, which is now used as the default HTTP transport.

Cloud Messaging

  • Limited the max thread count in the default ThreadPoolExecutor to 100 and removed a deadlock scenario when using sendEachAsync() or sendEachForMulticastAsync() APIs.

Version 9.3.0 - 21 May, 2024

  • Upgraded the dependency on libraries-bom to v26.39.0 and higher. This in turns upgrades the dependency on google-cloud-firestore and google-cloud-storage to the latest versions.

  • Added the setWriteTimeout() method to the FirebaseOptions.Builder class. These methods enable configuring timeouts for outgoing HTTP requests made by the SDK. These settings affect all requests except for the requests made to Firebase Realtime Database and Cloud Firestore. Thanks TheRittler for the contribution.

Version 9.2.0 - 22 June, 2023

Cloud Messaging

  • Added sendEach(), sendEachAsync(), sendEachForMulticast(), and sendEachForMulticastAsync() APIs.

  • sendAll(), sendAllAsync(), sendMulticast(), and sendMulticastAsync() APIs are now deprecated. Use sendEach(), sendEachAsync(), sendEachForMulticast(), and sendEachForMulticastAsync() APIs instead.

Cloud Firestore

  • Added support for multiple named databases. This feature is currently in public preview.

Version 9.1.1 - 10 November, 2022

Authentication

  • Fixed an issue in the Authentication API to correctly set the emulator credentials when the FIREBASE_AUTH_EMULATOR_HOST environment variable is set to point to the emulator Auth endpoint.

Version 9.1.0 - 17 October, 2022

Cloud Firestore

  • Upgraded the dependency on libraries-bom to v26.1.3 and higher. This in turns upgrades the dependency on google-cloud-firestore to the latest version, adding support for COUNT queries.

Version 9.0.0 - 16 June, 2022

  • Breaking change: Dropped support for Java 7. Developers should use Java 8 or higher when deploying the Admin SDK.

  • Breaking change: Upgraded the dependency on libraries-bom to v25 and higher. This in turns upgrades the dependencies on google-cloud-firestore and google-cloud-storage to the latest versions.

Version 8.2.0 - 02 June, 2022

  • Deprecated support for Java 7. Instead use Java 8 or higher when deploying the Admin SDK. Java 7 support will be dropped in the next major version.

Authentication

  • Added Argon2 hashing algorithm support in the importUsers() API.

Version 8.1.0 - 23 September, 2021

Firebase Remote Config

Version 8.0.1 - 13 August, 2021

Authentication

  • When checkRevoked is set to true, the verifyIdToken() and verifySessionCookie() APIs now throw an error if the user record is disabled.

Version 8.0.0 - 30 June, 2021

  • Upgraded the dependency on libraries-bom to v20 and higher. This in turns upgrades the dependencies on google-cloud-firestore and google-cloud-storage to latest available.
  • The latest google-cloud-firestore library contains several new features and breaking API changes. See the Firestore 2.0.0 release notes for more details.
  • The Admin SDK no longer retries RPCs that fail with HTTP 500 internal server errors. For certain services, retrying on HTTP 500 errors is not idempotent. The SDK will continue to retry RPCs that fail with HTTP 503 unavailable errors.

Version 7.3.0 - 11 May, 2021

Authentication

Version 7.2.0 - 28 April, 2021

Authentication

  • The Authentication API now supports running against Firebase emulator suite. Enable the emulator mode by setting the FIREBASE_AUTH_EMULATOR_HOST environment variable to point to the emulator Auth endpoint.
  • Added a new getUserByProviderUid() method to look up user accounts by their providers.
  • Added the ability to link a federated ID with the updateUser() method.

Version 7.1.1 - 10 March, 2021

Cloud Messaging

  • Improved support for handling certain non-JSON error responses sent by the FCM backend service.

Version 7.1.0 - 14 December, 2020

Firebase Remote Config

  • Added support for the Remote Config API. This API enables Firebase developers to programmatically manage the set of JSON-formatted parameters and conditions known as the Remote Config template.

Version 7.0.1 - 07 October, 2020

Authentication

  • Migrated the createCustomToken() API to use the new IAM credentials API for remote token signing.

Version 7.0.0 - 19 August, 2020

  • This release contains several breaking API changes. See the Java Admin SDK v7 migration guide for more details.
  • Added a collection of new APIs for implementing advanced error handling logic. See the error handling guide for more details.
  • Added a new ErrorCode enum that defines all platform error codes.
  • Added a new IncomingHttpResponse class that can be used to access the HTTP response object associated with an exception.

Authentication

  • Added a new AuthErrorCode enum that defines all Firebase Auth error codes.
  • FirebaseAuthException now exposes its error code as an AuthErrorCode value.
  • All implementations of the UserImportHash abstract class are now marked final.

Cloud Messaging

  • Added a new MessagingErrorCode enum that defines all FCM error codes.
  • FirebaseMessagingException now exposes its error code as a MessagingErrorCode value.
  • Public constructors of the Notification class have been removed. Use Notification.builder() to create new instances.

Version 6.16.0 - 12 August, 2020

Authentication

  • Exposed createSessionCookie() and verifySessionCookie() methods from the TenantAwareFirebaseAuth class. This makes it possible to create and verify tenant-scoped session cookies.

Version 6.15.0 - 23 July, 2020

  • The Admin SDK now imports all Google Cloud Platform dependencies via com.google.cloud:libraries-bom.

Authentication

Version 6.14.0 - 17 June, 2020

  • Upgraded Cloud Firestore dependency version to 1.34.0.
  • Upgraded Cloud Storage dependency version to 1.108.0.
  • Upgraded other SDK dependencies. Netty, Google API Client, Google HTTP Client, Google API Common, and JSON libraries that the SDK depends on have been upgraded to more recent versions.

Cloud Messaging

  • Added FcmOptions in MulticastMessage. Thanks pavlospt for the contribution.
  • Added support for direct_boot_ok parameter.

Version 6.13.0 - 14 May, 2020

Authentication

  • Added getUsers() and deleteUsers() APIs for retrieving and deleting user accounts in bulk.

Version 6.12.2 - 11 February, 2020

  • Project management APIs in the FirebaseProjectManagement class now automatically retry operations that fail due to retry-eligible HTTP errors.

Authentication

  • User management APIs in the FirebaseAuth class now automatically retry operations that fail due to retry-eligible HTTP errors.

Version 6.12.1 - 23 January, 2020

Cloud Messaging

  • AndroidNotification class now correctly formats the event_time field sent to the Cloud Messaging service.

Version 6.12.0 - 18 December, 2019

Cloud Firestore

  • Upgraded google-cloud-firestore dependency version to 1.31.0, which provides support for IN queries. Thanks achuinard for the contribution.

Cloud Messaging

  • Added notificationCount parameter to AndroidNotification class. Thanks knocknarea for the contribution.
  • The SDK now correctly handles the THIRD_PARTY_AUTH_ERROR error code returned by the backend service when sending notifications to iOS and web targets.

Version 6.11.0 - 30 October, 2019

  • Upgraded Cloud Firestore dependency version to 1.21.0.
  • Upgraded Cloud Storage dependency version to 1.91.0.

Cloud Messaging

  • Added a Builder for constructing Notification objects.
  • Added a series of new parameters to the AndroidNotification class that allow further customization of notifications that target Android devices.
  • Number of messages per batch increased to 500.

Version 6.10.0 - 04 September, 2019

Cloud Messaging

  • Added a new WebpushFcmOptions API for configuring the features provided by the FCM SDK for Web. Thanks kirmerzlikin for the contribution.
  • Added new APIs for specifying an image URL in notifications.

Realtime Database

  • Developers can now test Realtime Database API calls by directing the SDK traffic to the RTDB emulator. Set the FIREBASE_DATABASE_EMULATOR_HOST environment variable to specify the emulator endpoint in host:port format.

Version 6.9.0 - July 18, 2019

  • Upgraded Cloud Firestore client version to 1.9.0.
  • Upgraded Cloud Storage client version to 1.79.0.
  • Upgraded Google API client version to 1.30.1.
  • Upgraded Guava dependency version to 26.0-android.

Firebase Cloud Messaging

  • Added FcmOptions, AndroidFcmOptions and ApnsFcmOptions classes for specifying analytics labels for FCM notifications.
  • MulticastMessage.Builder API now supports specifying device registration tokens as a Collection instead of a List.

Version 6.8.1 - April 24, 2019

Firebase Cloud Messaging

  • The SDK now automatically retries FCM API calls failing due to HTTP 500 and 503 errors.

Realtime Database

  • The SDK now throws exceptions with clear error messages when serializing POJOs with non-standard numeric objects.

Version 6.8.0 - March 14, 2019

Firebase Cloud Messaging

  • A new sendMulticast() API for sending a message to a list of device registration tokens.
  • A new sendAll() API for sending a list of messages as a single batch.

Version 6.7.0 - January 9, 2019

  • Firestore instances initialized by the SDK are now cleaned up when FirebaseApp.delete() is called.

Authentication

  • Added the email action link generation APIs for creating links for password reset, email verification, and email link sign-in via generatePasswordResetLink(), generateEmailVerificationLink() and generateSignInWithEmailLink(). See documentation for more details and code samples.

Cloud Messaging

  • Aps class now supports configuring a critical sound. A new CriticalSound class has been introduced for this purpose.
  • Added new setChannelId() method to the AndroidNotification.Builder API for setting the Android notification channel ID (new in Android O).

Version 6.6.0 - November 28, 2018

  • A new FirebaseProjectManagement API for managing apps in a Firebase project.
  • New listAndroidApps() and listIosApps() methods for listing the existing apps in a project.
  • New createAndroidApp() and createIosApp() methods for creating new apps in a project.
  • New AndroidApp and IosApp APIs for updating individual apps.

Authentication

  • User management APIs in FirebaseAuth have been migrated to the new Identity Toolkit REST endpoint. A project ID is now required to use FirebaseAuth. Developers using service account credentials or deploying to managed Google runtimes like App Engine will not notice a difference.

Cloud Messaging

  • ApsAlert class now supports specyfing a subtitle. Thanks chemidy for the contribution.
  • Improved error handling by requesting a more verbose error response from the FCM backend service.

Version 6.5.0 - September 14, 2018

  • FirebaseOptions.Builder exposes a new setFirestoreOptions() method that can be used to configure the Firestore instances initialized by the SDK.
  • Upgraded Cloud Firestore client version to 0.61.0-beta.
  • Upgraded Cloud Storage client version to 1.43.0.

Version 6.4.0 - August 28, 2018

Cloud Messaging

  • The WebpushNotification type now provides a Builder API, and supports arbitrary key-value pairs in its payload.

Version 6.3.0 - July 17, 2018

  • The Admin SDK can now read the Firebase/Google Cloud Platform project ID from both GCLOUD_PROJECT and GOOGLE_CLOUD_PROJECT environment variables.

Authentication

  • The Admin SDK can now create custom tokens without being initialized with service account credentials.
  • The SDK now provides a setServiceAccountId() option specifier, which can be used to set just the client email of a service account.
  • When deployed in an environment managed by Google (e.g. Google App Engine), the SDK can auto discover a service account ID without any explicit configuration.

Version 6.2.0 - May 31, 2018

Authentication

Version 6.1.0 - May 15, 2018

Authentication

  • Deprecated the incorrectly named setCustomClaims() method. Developers should instead use the setCustomUserClaims() method.

Version 6.0.0 - May 8, 2018

  • FirebaseAuth, FirebaseMessaging, and FirebaseInstanceId interfaces now expose a set of blocking methods. Each operation has blocking and asynchronous versions.
  • Removed the deprecated FirebaseCredential interface.
  • Removed the deprecated Task interface along with the com.google.firebase.tasks package.
  • Dropped support for App Engine's Java 7 runtime. Developers are advised to use the Admin SDK with Java 8 when deploying to App Engine.
  • Removed the deprecated FirebaseDatabase.setLogLevel() API and related logging utilities. Developers should use SLF4J to configure logging directly.

    For more detail on these breaking changes, see the Admin SDK Migration Guide.

Version 5.11.0 - April 25, 2018

  • Upgraded the Google Cloud Firestore dependency version to 0.45.0-beta.
  • Upgraded the Google Cloud Storage dependency version to 1.27.0.
  • Upgraded the Netty dependency version to 4.1.22.

Authentication

Version 5.10.0 - April 17, 2018

Initialization

  • Added the setConnectTimeout() and setReadTimeout() methods to the FirebaseOptions.Builder class. These methods enable configuring timeouts for outgoing HTTP requests made by the SDK. These settings affect all requests except for the requests made to Firebase Realtime Database and Cloud Firestore.

Cloud Messaging

  • Added the setMutableContent() method to the Aps.Builder class. This can be used to set the mutable-content property when sending FCM messages to APNs targets.
  • Added support for specifying arbitrary key-value fields in the Aps.Builder class.
  • Improved error handling in the FirebaseMessaging API.

Authentication

  • The FirebaseAuth API now uses the HttpTransport configured via FirebaseOptions to fetch public key certificates when verifying ID tokens. Thanks xbauquet for the contribution.

Version 5.9.0 - February 14, 2018

Cloud Messaging

Authentication

  • The verifyIdTokenAsync() method now has an overload that accepts a boolean checkRevoked parameter. When true, an additional check is performed to see whether the token has been revoked.
  • A new revokeRefreshTokensAsync() mathod to invalidate all tokens issued to a user.
  • The UserRecord class introduces a new getTokensValidAfterTimestamp() method to return the time before which tokens are not valid.

Realtime Database

  • Exceptions thrown by database event handlers are now logged.

Cloud Firestore

  • Upgraded the Cloud Firestore client to the latest available version.

Initialization

  • The FirebaseOptions.Builder.setStorageBucket() method now throws a clear exception when invoked with a bucket URL instead of the name.
  • Implemented a fix for a potential Guava version conflict which was causing an IllegalStateException (precondition failure) in some environments.

Version 5.8.0 - January 11, 2018

Initialization

  • The FirebaseApp.initializeApp() method now provides an overload that does not require any arguments. This initializes an app using Google Application Default Credentials, and other FirebaseOptions loaded from the FIREBASE_CONFIG environment variable.

Authentication

  • Improved error handling in user management APIs in the FirebaseAuth class. These operations now throw exceptions with well-defined error codes.

Realtime Database

  • The SDK now serializes large whole double values as longs when appropriate.

Version 5.7.0 - December 21, 2017

  • A new FirebaseInstanceId API that facilitates deleting instance IDs and associated user data from Firebase projects.

Authentication

  • No longer using org.json dependency in Authentication APIs, which makes it easier to use the API in environments with conflicting JSON libraries.

Version 5.6.0 - December 08, 2017

  • Upgraded the version of Google API Common dependency to the latest (1.2.0).

Authentication

  • Added the listUsersAsync() method to the FirebaseAuth class. This method enables listing or iterating over all user accounts in a Firebase project.
  • Added the setCustomUserClaimsAsync() method to the FirebaseAuth class. This method enables setting custom claims on a Firebase user. The custom claims can be accessed via that user's ID token.

Realtime Database

  • Re-implemented the WebSocket communication layer of the Realtime Database client using Netty.

Version 5.5.0 - November 07, 2017

Realtime Database

Version 5.4.0 - October 11, 2017

  • A new ThreadManager API that can be used to specify the thread pool and the ThreadFactory that should be used by the SDK.
  • All APIs that support asynchronous operations now return an ApiFuture. The old Task API has been deprecated. For each method x() that returns a Task, a new xAsync() method that returns an ApiFuture has been introduced.
  • The SDK now guarantees the graceful termination of all started threads. In most environments, the SDK will use daemons for all background activities. The developer can also initiate a graceful termination of threads by calling FirebaseApp.delete().

Initialization

Version 5.3.1 - September 13, 2017

Authentication

  • Throwing an accurate and more detailed error from verifyIdToken() in the event of a low-level exception.

Realtime Database

  • Proper handling and logging of exceptions thrown by the onComplete() event of transaction handlers.

Version 5.3.0 - August 14, 2017

Authentication

  • Added the method getUserByPhoneNumber() to the FirebaseAuth interface. This method enables retrieving user profile information by a phone number.
  • CreateRequest and UpdateRequest types now provide setters for specifying a phone number, which can be used to create users with a phone number field and/or update the phone number associated with a user.
  • Added the getPhoneNumber() method to UserRecord, which exposes the phone number associated with a user account.
  • Added the getPhoneNumber() method to UserInfo, which exposes the phone number associated with a user account by a linked identity provider.

Realtime Database

  • Deprecated the FirebaseDatabase.setLogLevel() method. Use SLF4J to configure logging.
  • Logging a detailed error when the database client fails to authenticate with the backend Firebase servers.

Version 5.2.0 - June 14, 2017

  • New factory methods in the FirebaseCredentials class that accept HttpTransport and JsonFactory arguments. These settings are used when the credentials make HTTP calls to obtain OAuth2 access tokens.
  • New setHttpTransport() and setJsonFactory() methods in the FirebaseOptions class. These settings are used by all services of the SDK except FirebaseDatabase.

Version 5.1.0 - June 07, 2017

Authentication

  • A new user management API that allows provisioning and managing Firebase users from Java applications. This API adds getUser(), getUserByEmail(), createUser(), updateUser() and deleteUser() methods to the FirebaseAuth interface.

Version 5.0.1 - June 01, 2017

Realtime Database

  • Fixed a database API thread leak that made the SDK unstable when running in the Google App Engine environment.

Version 5.0.0 - May 17, 2017

Initialization

  • Factory methods in FirebaseCredentials class can now throw IOExceptions, providing fail-fast semantics while facilitating simpler error handling.
  • The deprecated setServiceAccount() method has been removed from the FirebaseOptions.Builder class in favor of the setCredential() method.
  • Trying to initialize the SDK without setting a credential now results in an exception.
  • The FirebaseCredential interface now returns a new GoogleOAuthAccessToken type, which encapsulates both token string and its expiry time.

Version 4.1.7 - April 20, 2017

  • Introducing a new FirebaseApp.delete() method, which can be used to gracefully shut down app instances. All app invocations after a call to delete() will throw exceptions. Deleted app instances can also be re-initialized with the same name if necessary.

  • Upgraded SDK dependencies. Guava, Google API Client, and JSON libraries that the SDK depends on have been upgraded to more recent versions.

Version 4.1.6 - April 04, 2017

Realtime Database

  • Updated the SDK to select the correct thread pool implementation when running on a regular JVM with App Engine libraries in the classpath.

Version 4.1.5 - March 28, 2017

Realtime Database

  • Fixed the invalid SDK version constant in the FirebaseDatabase class that was released in v4.1.4.

Version 4.1.4 - March 28, 2017

Authentication

  • Updated the SDK to periodically refresh the OAuth access token internally used by FirebaseApp. This reduces the number of authentication failures encountered at runtime by various SDK components (e.g. Realtime Database) to nearly zero. This feature is active by default when running in typical Java environments, or the Google App Engine environment with background threads support.

Version 4.1.3 - March 7, 2017

Realtime Database

  • Updated Realtime Database to properly swap out the ID token used to authenticate the underlying websocket when a new ID token is generated. The websocket connection is still disconnected and reconnected every hour when an ID token expires unless you manually call getAccessToken on the FirebaseCredential used to authenticate the SDK. In a future release, the SDK will proactively refresh ID tokens automatically before they expire.

Version 4.1.2 - February 14, 2017

Initialization

  • Updated initializeApp() to synchronously read from an InputStream to avoid issues with closing the stream after initializing the SDK.
  • Improved confusing error messages when initializing the SDK with a null or malformed InputStream.

Version 4.1.1 - February 1, 2017

Authentication

  • Fixed a dependency issue which caused the verifyIdToken() method to always throw an exception.

Version 4.1.0 - January 24, 2017

Initialization

Authentication

  • The verifyIdToken() method is broken in this release and throws an exception due to an incorrect dependency. This was fixed in version 4.1.1.

Version 4.0.4 - January 17, 2017

  • Fixed issue which caused threads to be terminated in Google App Engine after 24 hours, rendering the SDK unresponsive.
  • Fixed issues which caused asynchronous task execution to fail on automatically-scaled Google App Engine instances.

Authentication

  • Improved error messages and added App Engine support for the verifyIdToken() method.

Realtime Database

  • Fixed a race condition which could occur when new writes are added while the connection is being closed.

Version 4.0.3 - December 6, 2016

Initialization

  • Fixed an issue that caused a null input to the setDatabaseAuthVariableOverride() method to be ignored, which caused the app to still have full admin access. Now, passing this value has the expected behavior: the app has unauthenticated access to the Realtime Database, and behaves as if no user is logged into the app.

Realtime Database

  • Use of the updateChildren() method now only cancels transactions that are directly included in the updated paths (not transactions in adjacent paths). For example, an update at /move for a child node walk will cancel transactions at /, /move, and /move/walk and in any child nodes under /move/walk. But, it will no longer cancel transactions at sibling nodes, such as /move/run.

Version 4.0.2 - November 15, 2016

  • This update restores Java 7 compatibility for the Admin Java SDK.

Version 4.0.1 - November 8, 2016

  • Fixed an issue with a missing dependency in the 4.0.0 JAR which caused the Database API to not work.
  • This version was compiled for Java 8 and does not support Java 7. This was fixed in version 4.0.2.

Version 4.0.0 - November 7, 2016

  • The Admin Java SDK (available on Maven as firebase-admin) replaces the pre-existing firebase-server-sdk Maven package, which is now deprecated. See Add the Firebase Admin SDK to your Server to get started.
  • This version is missing a dependency which causes the Database API to not work. This was fixed in version 4.0.1.
  • This version was compiled for Java 8 and does not support Java 7. This was fixed in version 4.0.2.

Authentication

  • The createCustomToken() method is now asynchronous, returning a Task<String> instead of a String.