Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: (gcloud.alpha.functions.deploy) ResponseError: status=[403], code=[Forbidden], message=[Cannot access Google Cloud Functions API in project

I'm new using Google's APIs.

I'm following step by step the next tutorial made by Google: https://cloud.google.com/functions/docs/tutorials/ocr

I want to deploy a specific function provided by Google (the processImage function).

I entered this into the console:

gcloud alpha functions deploy ocr-extract --stage-bucket [YOUR_STAGING_BUCKET_NAME] --trigger-bucket [YOUR_IMAGE_BUCKET_NAME] --entry-point processImage

But it gives me this error:

Error: (gcloud.alpha.functions.deploy) ResponseError: status=[403], code=[Forbidden], message=[Cannot access Google Cloud Functions API in project
like image 968
DavidQuezada7 Avatar asked Nov 18 '16 19:11

DavidQuezada7


2 Answers

I faced the same error. It got resolved once I did gcloud init in my command prompt terminal. Mentioned command linked my GCP project to the folder where my files were present. After that command mentioned by you worked.

like image 74
Pratik Kaje Avatar answered Oct 22 '22 20:10

Pratik Kaje


You should Initialize the SDK first.

  1. run gcloud init
  2. config your login account and select your project name.
like image 24
Joe Avatar answered Oct 22 '22 19:10

Joe