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

5

9

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

Infectious answered 8/9, 2021 at 15:8 Comment(0)
I
4

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
Infectious answered 9/9, 2021 at 8:38 Comment(0)
C
1

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

Charger answered 30/11, 2021 at 5:16 Comment(0)
B
0

You can also manually enable Cloud Build API and Artifact Registry API for the corresponding project through the Google Cloud Console

Bastogne answered 19/4, 2023 at 14:46 Comment(0)
P
0

I had this issue when deploying Cloud Functions

How to solve it?

  1. go to this link https://console.cloud.google.com/
  2. in the link go to the IAM section
  3. the project in which you are working on the left side of project name you see a pen, click on that and make yourself as a onwer
Plastometer answered 15/9, 2023 at 4:47 Comment(0)
D
0

Just to update this a bit more.. for those new to the game. The error message "Permission denied to get service [firebasedataconnect.googleapis.com]" is a clear indicator that the Firebase Data Connect API is not enabled for your project. Here's how to fix it:

Go to the Google Cloud Console: Navigate to the Google Cloud Console (console.cloud.google.com). Find the API Library: In the navigation menu, search for "API Library." Search for Firebase Data Connect: Type "Firebase Data Connect" in the search bar and select the API. Enable the API: Click the "Enable" button. Important Note: It might take a few minutes for the API to fully enable. Once it's enabled, try running firebase init dataconnect again.

Dora answered 14/9 at 7:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.