---
description: Unofficial Capacitor plugin for Firebase Cloud Functions SDK to call backend functions in your app with support for Android, iOS, and Web.
title: Capacitor Firebase Cloud Functions Plugin - Capawesome
image: https://capawesome.io/docs/assets/images/social/plugins/firebase/cloud-functions.png
---

[ Skip to content](#capacitor-firebasefunctions) 

[ 🎉 Introducing **Capawesome Platform** — one platform for Live Updates, Native Builds, App Store Publishing, and Insider SDKs.](https://capawesome.io) 

* [  Configuration ](#configuration)
* [  Demo ](#demo)
* [  Usage ](#usage)
* [  API ](#api)
* [  Type Aliases ](#type-aliases)
* [  Changelog ](#changelog)
* [  License ](#license)
* [  Cloud Messaging ](/docs/plugins/firebase/cloud-messaging/)
* [  Cloud Storage ](/docs/plugins/firebase/cloud-storage/)
* [  Performance Monitoring ](/docs/plugins/firebase/performance-monitoring/)
* [  Remote Config ](/docs/plugins/firebase/remote-config/)
* [  Formbricks ](/docs/plugins/formbricks/)
* [  Geocoder ](/docs/plugins/geocoder/)
* [  Google Sign-In ](/docs/plugins/google-sign-in/)
* [  libSQL ](/docs/plugins/libsql/)
* [  Live Update ](/docs/plugins/live-update/)
* [  Managed Configurations ](/docs/plugins/managed-configurations/)
* [  Media Session ](/docs/plugins/media-session/)
* [  ML Kit ](/docs/plugins/mlkit/)
* [  NFC ](/docs/plugins/nfc/)
* [  OAuth ](/docs/plugins/oauth/)
* [  Pedometer ](/docs/plugins/pedometer/)
* [  Photo Editor ](/docs/plugins/photo-editor/)
* [  PostHog ](/docs/plugins/posthog/)
* [  Printer ](/docs/plugins/printer/)
* [  Purchases ](/docs/plugins/purchases/)
* [  RealtimeKit ](/docs/plugins/realtimekit/)
* [  Screen Orientation ](/docs/plugins/screen-orientation/)
* [  Screenshot ](/docs/plugins/screenshot/)
* [  Secure Preferences ](/docs/plugins/secure-preferences/)
* [  Speech Recognition ](/docs/plugins/speech-recognition/)
* [  Speech Synthesis ](/docs/plugins/speech-synthesis/)
* [  Share Target ](/docs/plugins/share-target/)
* [  Square Mobile Payments ](/docs/plugins/square-mobile-payments/)
* [  SQLite ](/docs/plugins/sqlite/)
* [  Superwall ](/docs/plugins/superwall/)
* [  Torch ](/docs/plugins/torch/)
* [  Wifi ](/docs/plugins/wifi/)
* [  Zip ](/docs/plugins/zip/)
* [  Cloud ](/docs/cloud/)
* [  Live Updates ](/docs/cloud/live-updates/)
* Advanced
* Integrations
* [  Native Builds ](/docs/cloud/native-builds/)
* [  Configuration ](/docs/cloud/native-builds/configuration/)
* [  Environments ](/docs/cloud/native-builds/environments/)
* Guides
* [  Sample Projects ](/docs/cloud/native-builds/sample-projects/)
* [  Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [  Automations ](/docs/cloud/automations/)
* [  Assist ](/docs/cloud/assist/)
* Account
* Organizations
* [  Organization and User Management ](/docs/cloud/organizations/memberships/)
* [  Single Sign-On (SSO) ](/docs/cloud/organizations/sso/)
* [  Teams ](/docs/cloud/organizations/teams/)
* [  Two-Factor Authentication ](/docs/cloud/organizations/two-factor-authentication/)
* [  Integrations ](/docs/cloud/integrations/)
* [  License Keys ](/docs/cloud/license-keys/)
* [  Webhooks ](/docs/cloud/webhooks/)
* [  Pricing ](https://capawesome.io/pricing/)
* [  FAQ ](/docs/cloud/faq/)
* [  Support ](/docs/cloud/support/)
* [  Contributing ](/docs/contributing/)
* [  LLMs ](/docs/llms/)
* [  Insiders ](/docs/insiders/)
* [  License ](https://capawesome.io/legal/eula/)
* [  Support ](/docs/insiders/support/)
* [  FAQ ](/docs/insiders/faq/)
* [  Blog ](/blog/)
* Categories

* [  Configuration ](#configuration)
* [  Demo ](#demo)
* [  Usage ](#usage)
* [  API ](#api)
* [  Type Aliases ](#type-aliases)
* [  Changelog ](#changelog)
* [  License ](#license)

# @capacitor-firebase/functions[¶](#capacitor-firebasefunctions "Permanent link")

Unofficial Capacitor plugin for [Firebase Cloud Functions](https://firebase.google.com/docs/functions/).[1](#fn:1)

[ ![Deliver Live Updates to your Capacitor app with Capawesome Cloud](../../../assets/external/cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.69628c3f.png) ](https://cloud.capawesome.io/) 

## Newsletter[¶](#newsletter "Permanent link")

Stay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).

## Compatibility[¶](#compatibility "Permanent link")

| Plugin Version | Capacitor Version | Status         |
| -------------- | ----------------- | -------------- |
| 8.x.x          | \>=8.x.x          | Active support |
| 7.x.x          | 7.x.x             | Deprecated     |

## Installation[¶](#installation "Permanent link")

You can use our **AI-Assisted Setup** to install the plugin. Add the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:

`[](#%5F%5Fcodelineno-0-1)npx skills add capawesome-team/skills --skill capacitor-plugins
`

Then use the following prompt:

`` [](#%5F%5Fcodelineno-1-1)Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capacitor-firebase/functions` plugin in my project.
 ``

If you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:

`[](#%5F%5Fcodelineno-2-1)npm install @capacitor-firebase/functions
[](#%5F%5Fcodelineno-2-2)npx cap sync
`

Add Firebase to your project if you haven't already ([Android](https://firebase.google.com/docs/android/setup) / [iOS](https://firebase.google.com/docs/ios/setup)).

### Android[¶](#android "Permanent link")

#### Variables[¶](#variables "Permanent link")

If needed, you can define the following project variable in your app’s `variables.gradle` file to change the default version of the dependency:

* `$firebaseFunctionsVersion` version of `com.google.firebase:firebase-functions` (default: `22.1.0`)

This can be useful if you encounter dependency conflicts with other plugins in your project.

## Configuration[¶](#configuration "Permanent link")

No configuration required for this plugin.

## Demo[¶](#demo "Permanent link")

A working example can be found here: [robingenz/capacitor-firebase-plugin-demo](https://github.com/robingenz/capacitor-firebase-plugin-demo)

## Usage[¶](#usage "Permanent link")

`[](#%5F%5Fcodelineno-3-1)import { FirebaseFunctions } from '@capacitor-firebase/functions';
[](#%5F%5Fcodelineno-3-2)
[](#%5F%5Fcodelineno-3-3)const callByName = async () => {
[](#%5F%5Fcodelineno-3-4)    const { data } = await FirebaseFunctions.callByName({
[](#%5F%5Fcodelineno-3-5)        name: 'helloWorld',
[](#%5F%5Fcodelineno-3-6)        data: {
[](#%5F%5Fcodelineno-3-7)            string: 'Hello World!',
[](#%5F%5Fcodelineno-3-8)            number: 123,
[](#%5F%5Fcodelineno-3-9)            boolean: true,
[](#%5F%5Fcodelineno-3-10)            array: [1, 2, 3],
[](#%5F%5Fcodelineno-3-11)            object: {
[](#%5F%5Fcodelineno-3-12)                key: 'value'
[](#%5F%5Fcodelineno-3-13)            }
[](#%5F%5Fcodelineno-3-14)        }
[](#%5F%5Fcodelineno-3-15)    });
[](#%5F%5Fcodelineno-3-16)    return data;
[](#%5F%5Fcodelineno-3-17)};
[](#%5F%5Fcodelineno-3-18)
[](#%5F%5Fcodelineno-3-19)const callByUrl = async () => {
[](#%5F%5Fcodelineno-3-20)    const { data } = await FirebaseFunctions.callByUrl({
[](#%5F%5Fcodelineno-3-21)        url: 'https://us-central1-YOUR_PROJECT_ID.cloudfunctions.net/helloWorld',
[](#%5F%5Fcodelineno-3-22)        data: {
[](#%5F%5Fcodelineno-3-23)            string: 'Hello World!',
[](#%5F%5Fcodelineno-3-24)            number: 123,
[](#%5F%5Fcodelineno-3-25)            boolean: true,
[](#%5F%5Fcodelineno-3-26)            array: [1, 2, 3],
[](#%5F%5Fcodelineno-3-27)            object: {
[](#%5F%5Fcodelineno-3-28)                key: 'value'
[](#%5F%5Fcodelineno-3-29)            }
[](#%5F%5Fcodelineno-3-30)        }
[](#%5F%5Fcodelineno-3-31)    });
[](#%5F%5Fcodelineno-3-32)    return data;
[](#%5F%5Fcodelineno-3-33)};
[](#%5F%5Fcodelineno-3-34)
[](#%5F%5Fcodelineno-3-35)const useEmulator = async () => {
[](#%5F%5Fcodelineno-3-36)  await FirebaseFunctions.useEmulator({
[](#%5F%5Fcodelineno-3-37)    host: '10.0.2.2',
[](#%5F%5Fcodelineno-3-38)    port: 9001,
[](#%5F%5Fcodelineno-3-39)  });
[](#%5F%5Fcodelineno-3-40)};
`

## API[¶](#api "Permanent link")

* [callByName(...)](#callbyname)
* [callByUrl(...)](#callbyurl)
* [useEmulator(...)](#useemulator)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)

### callByName(...)[¶](#callbyname "Permanent link")

`[](#%5F%5Fcodelineno-4-1)callByName<RequestData = unknown, ResponseData = unknown>(options: CallByNameOptions<RequestData>) => Promise<CallByNameResult<ResponseData>>
`

Call a callable function by name.

| Param       | Type                                                 |
| ----------- | ---------------------------------------------------- |
| **options** | [CallByNameOptions](#callbynameoptions)<RequestData> |

**Returns:** `Promise<[CallByNameResult](#callbynameresult)<ResponseData>>`

**Since:** 6.1.0

---

### callByUrl(...)[¶](#callbyurl "Permanent link")

`[](#%5F%5Fcodelineno-5-1)callByUrl<RequestData = unknown, ResponseData = unknown>(options: CallByUrlOptions<RequestData>) => Promise<CallByUrlResult<ResponseData>>
`

Call a callable function by URL.

| Param       | Type                                               |
| ----------- | -------------------------------------------------- |
| **options** | [CallByUrlOptions](#callbyurloptions)<RequestData> |

**Returns:** `Promise<[CallByUrlResult](#callbyurlresult)<ResponseData>>`

**Since:** 6.1.0

---

### useEmulator(...)[¶](#useemulator "Permanent link")

`[](#%5F%5Fcodelineno-6-1)useEmulator(options: UseEmulatorOptions) => Promise<void>
`

Instrument your app to talk to the Cloud Functions emulator.

On Android, the cleartext traffic must be allowed. On the Capacitor configuration:

`[](#%5F%5Fcodelineno-7-1){
[](#%5F%5Fcodelineno-7-2)  server: {
[](#%5F%5Fcodelineno-7-3)    cleartext: true
[](#%5F%5Fcodelineno-7-4)  }
[](#%5F%5Fcodelineno-7-5)}
`

**The cleartext traffic is not intended for use in production.** 

| Param       | Type                                      |
| ----------- | ----------------------------------------- |
| **options** | [UseEmulatorOptions](#useemulatoroptions) |

**Since:** 6.1.0

---

### Interfaces[¶](#interfaces "Permanent link")

#### CallResult[¶](#callresult "Permanent link")

| Prop     | Type         | Description                          | Since |
| -------- | ------------ | ------------------------------------ | ----- |
| **data** | ResponseData | The result of the callable function. | 6.1.0 |

#### CallByNameOptions[¶](#callbynameoptions "Permanent link")

| Prop       | Type   | Description                          | Since |
| ---------- | ------ | ------------------------------------ | ----- |
| **name**   | string | The name of the callable function.   | 6.1.0 |
| **region** | string | The region of the callable function. | 6.1.0 |

#### CallByUrlOptions[¶](#callbyurloptions "Permanent link")

| Prop    | Type   | Description                       | Since |
| ------- | ------ | --------------------------------- | ----- |
| **url** | string | The URL of the callable function. | 6.1.0 |

#### UseEmulatorOptions[¶](#useemulatoroptions "Permanent link")

| Prop                     | Type   | Description                                                                                                                                                                     | Default | Since |
| ------------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ----- |
| **host**                 | string | The emulator host without any port or scheme. Note when using a Android Emulator device: 10.0.2.2 is the special IP address to connect to the 'localhost' of the host computer. | 6.1.0   |       |
| **port**                 | number | The emulator port.                                                                                                                                                              | 5001    | 6.1.0 |
| **regionOrCustomDomain** | string | The region the callable functions are located in or a custom domain hosting the callable functions.                                                                             |         |       |

### Type Aliases[¶](#type-aliases "Permanent link")

#### CallByNameResult[¶](#callbynameresult "Permanent link")

`[CallResult](#callresult)<ResponseData>`

#### CallByUrlResult[¶](#callbyurlresult "Permanent link")

`[CallResult](#callresult)<ResponseData>`

## Changelog[¶](#changelog "Permanent link")

See [CHANGELOG.md](https://github.com/capawesome-team/capacitor-firebase/blob/main/packages/functions/CHANGELOG.md).

## License[¶](#license "Permanent link")

See [LICENSE](https://github.com/capawesome-team/capacitor-firebase/blob/main/packages/functions/LICENSE).

---

1. This project is not affiliated with, endorsed by, sponsored by, or approved by Google LLC or any of their affiliates or subsidiaries. [↩](#fnref:1 "Jump back to footnote 1 in the text")

May 21, 2026 

 Back to top 