public final class FirebaseFunctions

FirebaseFunctions lets you call Cloud Functions for Firebase.

Summary

Public methods

getInstance

public static final @NonNull FirebaseFunctions getInstance(@NonNull String regionOrCustomDomain)

Creates a Cloud Functions client with the default app and given region or custom domain.

Parameters
@NonNull String regionOrCustomDomain

The region or custom domain for the HTTPS trigger, such as "us-central1" or "https://mydomain.com".

useEmulator

public final void useEmulator(@NonNull String host, int port)

Modifies this FirebaseFunctions instance to communicate with the Cloud Functions emulator.

Note: Call this method before using the instance to do any functions operations.

Parameters
@NonNull String host

the emulator host (for example, 10.0.2.2)

int port

the emulator port (for example, 5001)

Extension functions

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 2025-07-21 UTC.