I\'m trying to create a script in Cloud Functions for Firebase that will react to a db event and remove an image that has its path in one of the params (\"fullPath\").
ok, so i got this solved. here are my conclusions:
you need to add to your buckets name the ".appspot.com". Its not written anywhere in the docs and getting your bucket name in firebase is hard enough for someone that is not familiar in the google cloud. I hope they will add this little peace of information into their docs or make it clear what is your bucket's name in firebase.
use the environment variable process.env.GCLOUD_PROJECT, it should have your project id that is identical to your bucket id in firebase. again, remember to add the .appspot.com suffix to it.
regarding the credentials to GCS, you don't need to provide them when using cloud functions for firebase. you seem to be authenticated already.