how to set the Storage Access API? - google-cloud-platform

When I test my app using a web preview, it shows the above page.
I do not know how to install it? Set? Storage Access API
Where to install Storage Access API?

Before you can use the Cloud Shell these are steps you should follow:
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Note:
If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.
Go to project selector
Make sure that billing is enabled for your Cloud project. Learn how to check if billing is enabled on a project.
Then follow the following steps below to enable the API in your own Google Cloud project.
In the Cloud console, go to APIs & services for your project.
Go to APIs & Services
On the Library page, click Private APIs. If you don't see the API listed, that means you haven't been granted access to enable the API.
Click the API(look for Storage Access API) you want to enable. If you need help finding the API, use the search field.
On the page that displays information about the API, click Enable.
Reference:
https://cloud.google.com/shell/docs/run-gcloud-commands
https://cloud.google.com/endpoints/docs/openapi/enable-api#console

It might be already enabled but there is a bug in this page so you need to re-authenticate
Open developer tools in your browser and select Network
you will find a line starting with accounts.google.com open it and authorize cloudshell.

Related

Google Search Console API suggests enabling API for unfamiliar project number

I have an account that is the verified owner for a property listed in the Google Search Console. I'm working to set up API access to it. I have a principal created that has access to each of the Google Cloud projects that I intend to query the data from. I've enabled the Google Search Console API for each of these projects.
After I authenticate the principal via OAuth2 and use the access token (including the 'https://www.googleapis.com/auth/webmasters.readonly' scope) to make a POST request to the query endpoint, I get an error message back that reads in part:
Google Search Console API has not been used in project 256595xxxxxx before or it is disabled
I searched this number in my Google Cloud Console and manually clicked through each of my properties and it doesn't match any of the projects on my account. How do I identify which project this number is referring to and/or how do I change it to point to one of my own Google Cloud properties so I might access its API?
Note: This answer speaks to what it is I'm trying to do (but with Google Search Console API), except that the error doesn't reflect my project ID, so I'm stumped about how to move forward with enabling the API on it.
This didn't take long to solve. After listing all the projects in the Google Cloud CLI per the first half of the instruction here, I was able to identify the project as that which is used as the service principal to do the authentication in the first place (and not actually an account I intend to export any of the data to).

Attempting to generate & download Google Drive API credentials

I'm currently following a tutorial, and I'm on this step:
Go to https://developers.google.com/drive/api/v3/quickstart/go, click
"Enable the Drive API", select the account with the stash and click
"Download Client Configuration".
I'm assuming Google changed the process for this because these settings aren't here. I also don't see them in the API console. Any suggestions on how I can find this information?
That button used to prompt you a list of existing Google Cloud Platform projects, from which you would have to select one. Then the API would be enabled on the selected project. You can replicate that approach easily by following these steps:
If you need to create a GCP project, adopt this guide. Otherwise you can skip this step.
To enable an API into a GCP project, adhere to those steps.

Firebase project not listed in Google Cloud console

I created a project in Firebase, and now want to access additional services in GCP. But the Google Cloud console does not list the Firebase project anywhere I can see.
This page gives instructions for the other direction (importing a GCP project into Firebase). This post makes it sound like it should just happen automatically -- but it's not for me.
(I do see all the other projects I've created directly from the google cloud console.)
This happened to me. I was able to find the new project in the gcp web console as follows:
login to the cloud console
click on the project pulldown in the top left corner.
click the "ALL" tab from the "Select a project" modal dialog: you should see your new project in the list.
You may need to check the organization. Make sure, you are looking in the same organisation where the firebase project is created.

"Unable to retrieve database locations" error when setting up Google cloud Datastore

I am trying to setup Cloud Datastore, in GCP. Upon selecting "Cloud Datastore", in console, I see the "Choose where to store your data" page, with this error:
"Unable to retrieve database locations
There was a problem retrieving the available storage locations for your data. Retry or return later to finish getting set up."
Has anybody encountered this?
I have encountered same and resolved as below. (Iam using free tier)
When you select a location in either product (Cloud Datastore or App Engine), you set the location for your entire Google Cloud Platform project. I choose location to set from App Engine.
From Home (on left side) --> App Engine --> Select a language (I have selected "python"). --> It prompts for location (I have selected "us-central") --> (press) Next
Thats it come out of the tutorial. Next time I selected Datastore, it worked fine.
Hope this helps (screens below)
SCREEN1
SCREEN2
SCREEN3
SCREEN4
I've encountered the exact same error. Some of the Google Cloud management tools are a bit buggy, gcloud included, they need more TLC and more users to report bugs to Google. The best way around the bugs is to either use the Firebase Console or the App Engine console. Either one of these two appear to be required to provide the missing management glue between the various Cloud products Google has. The Firebase console IMHO is superior to the app engine console, and that's what I would recommend using. You can create the DB from the Firebase console. it will also add Firebase to your project, giving you access to the Firebase CLI, which works very well and doesn't have all the bugs that gcloud CLI has.
Go to https://console.firebase.google.com/u/0/ to open the firebase console
Click on +Add Project and select the project you created using the Google Cloud Console.
This will prompt you to accept addind Firebase for this project. Click accept, it will enable access to the project via the Firebase emulator and firebase CLI, you definitely want this.
Under Develop in the left hand menu, select Database, from there you will be able to add the version you want. Keep in mind only the old firestore has an SLA, but the new native Cloud Datastore is better, it has the pub/sub on events on read/writes.
I use Firebase to manage microservices that are only accessible via special routing from other backends and don't use any Firebase client code, it's just so much easier to manage the functions and run them locally with the firebase emulator before deploying using the Firebase CLI. I've not had the same luck with gcloud or using the Google cloud console as opposed to the Firebase console. On the other hand, Firebase CLI, the emulator and the Firebase console are fantastic, pretty seamless experience. It's been a joy using them. I wish I could say the same about the Cloud console, I go in there only when truly necessary.

CLI to create Google OAuth 2.0 project

Is there any command line interface to create Google OAuth 2.0 project?
To integrate the log in with Google, we need to register the project by clicking Configure A Project button and then create a new project.
https://developers.google.com/identity/sign-in/web/sign-in
Is there any CLI to automate this process?
Yes, there is: the Cloud SDK.
More specifically, you're looking for the command: gcloud projects create.
You may also want to read about creating and managing Google Cloud Projects, since you have limited quota for creating projects. You may also be interested in Google Cloud's Resource Hierarchy.
But, most importantly, you may not need a project each time you want to have a new OAuth 2.0 client. Each project can have multiple OAuth 2.0 client IDs/credentials,you just need to fill the settings and create your client credentials.