Back

Firebase Admin setup in Appwrite functions

  • 0
  • Android
  • Functions
  • Realtime
  • Cloud
Shivam
20 Jan, 2025, 06:52

How can I store Json file in environment variable of functions? Because I need to store Firebase service key. And also, how to fetch that Json in python code?

TL;DR
Developers want to set up Firebase Admin in Appwrite functions by storing the service account key JSON file in an environment variable. This can be achieved by uploading the JSON file to the cloud functions and referencing its location in the environment variable. To fetch the JSON in Python code, developers can use the `os` module to read the environment variable and authenticate Firebase Admin with the service account key.
Shivam
20 Jan, 2025, 06:56

I need to do this:

TypeScript
cred = credentials.Certificate('path/to/serviceAccountKey.json')
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more