HTTP Error: 403, Permission denied to enable service [cloudfunctions.googleapis.com]

Viewed 3484

I have firebase admin permission and cloud functions admin access but even then when I try to run firebase init functions command it gives me following error.

Error: HTTP Error: 403, Permission denied to enable service [runtimeconfig.googleapis.com] Help Token *******

I found similar question here. but not sure will it work or not as I am not owner.

I am not sure what is causing this error or permission or role is missing. Please help me on this. #AskFirebase

2 Answers

I found out the issue. I had Firebase Admin and Cloud Function Admin role. But to enable any of the api user should have Owner or Editor role.

Please refer to this link here

UPDATE

Due to security reason owner of the project was not able to give me editor role. If you are in such situation than granting user following two role will allow them to perform command such as firebase init functions

  1. Cloud Function Admin
  2. Service Account User

I had this issue when deploying Cloud Functions from Cloud Build with the firebase community builder.

It turned out that I missed the "Required IAM permissions" part when following the instructions. Basically, add Cloud Build Service Account, Firebase Admin and API Keys Admin roles, to the the email ending with @cloudbuild.gserviceaccount.com.

Reference: https://cloud.google.com/build/docs/deploying-builds/deploy-firebase

Related