Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get firebase function url from admin SDK programatically

Is there a way to get the Firebase Function url from the Admin SDK for nodejs?

In prod it will look like: https://REGION-PROJECT.cloudfunctions.net/FUNCTION_NAME

And when serving locally: http://localhost:PORT/PROJECT/REGION/FUNCTION_NAME

Is it possible to get this value in nodejs programmatically? E.g. from admin or configuration settings?

like image 604
Diolor Avatar asked Dec 03 '25 18:12

Diolor


1 Answers

The Firebase Admin SDK doesn't expose any APIs that deal with Cloud Functions. From what you've shared, it sounds like you have everything you need to build the URL yourself, which is the right way to go.

If you really must use another piece of software, you'll have to dive very deep into the inner workings of the Firebase CLI and figure out how to reuse its code. You'll probably have to look in two places - one for the emulator, and another for deployment. I suspect this is almost certainly not going to be worth your time, since building the strings yourself is pretty straightforward.

like image 173
Doug Stevenson Avatar answered Dec 05 '25 12:12

Doug Stevenson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!