Unable to create the first GCP project via API - google-cloud-platform

I'm trying to create a Dialogflow Agent via API, It require a GCP project that also have to be created via API.
Actually both works well when the end user has already been once in the GCP console and accept the new terms and services.
The problem is that I would like to create the agent without the end user to have to perform any action on Google Cloud Platform.
Before it was possible, but it seems Google added a new terms of services for APIs on the GCP console that pop up the first time the user log in.
My question is, do you think there's any possibility to accepte those terms of services via Oauth or any other possibility?
Seems like Dialogflow still does it well.. so it should be possible :p
TY.

As stated by #John Hanley the user must login to accept the TOS so that the user-entity is bound to the Terms. Here you may find all the information regarding Google APIs Terms of Service.

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).

Bulk delete users from Google Cloud Identity Platform

I've been googling around, reading the google cloud platform docs but can't find the answer to bulk deleting users from the Identity Platform.
We have a dev application that we use for testing. We want to remove all authenticated users and start fresh. See below the image where I multi select and get no option to delete all the users.
I've searched for gcloud cli commands to do this but with no luck, the documentation on this functionality is not well surfaced.
I would be happy with answers to:
Bulk delete through the G cloud UI
Delete ALL authenticated users through gcloud cli
Delete all users per tenant
You can make use of the Identity Toolkit API for bulk deleting users.
If you read through the Admin APIs guide for Identity Platform on Google Cloud, you will also notice that they recommend using the Admin APIs for user management.
What you are looking for is:
projects.accounts.lookup for looking up all users (or projects.tenants.accounts.lookup if you want to look up for a specific tenant).
projects.accounts.bachDelete for bulk-deleting users in your project (or projects.tenants.accounts.batchDelete if you want to target a specific tenant).

Google Sheet asking for authorization gets 401: deleted_client

I cannot seem to get past the Google Authorization pop that always returns Error 401: deleted_client.
I created a Google sheet script a while back and I need to get it working again. I made a GCP account and tried messing around with that for hosting the app but I realized I didn't need that so I deleted all of my projects and my billing account. But I still can't get past the Google Sheet error when it tries to authorize my account. This worked before I started anything with GCP and was fine.
I've seen other issues saying that there needs to have some fixes in the GCP account and that's fine and all but I do not want this connected to GCP at all. I will never use GCP again and I can't even find a way to shut down the account entirely without removing my Google account.
I've tried clearing all cache and cookies from chrome since the beginning of time like some others have suggested that doesn't fix the issue either.
Thanks in advance!
It's confusing but, if your script uses Google APIs you must associate the script with a Google Cloud Platform (GCP) project.
See Google Cloud Platform projects for an explanation of this relationship.
GCP projects are used to group enabled Google services, to provide identities and configure OAuth.
Please read the document but see (re)creating OAuth credentials.
You'll need to:
Create a GCP project
Enable Google services
Configure OAuth consent
DazWilkin lead me in the right direction!
The last thing that was needed was to go to the existing Google Sheet script, hit the gear in the left panel of the new editor, then change the GCP project number to match the GCP project I created with OAuth creds. Thanks again!

OAuth2 consent setup for individual private application

I'm trying to send prediction requests to the google cloud ai platform from an android application. In order to do this I seem to need OAuth2 verification. I do not want to use the 'External' option as it is not an external application and will only be used by yours truly, but I cannot use the 'Internal' application without a G Suite account.
You can use Google Cloud Functions, please take a look at this Blog Post.
Basically you can call Cloud Functions directly and Cloud Functions take care of the authentication to AI Platform.
Also this may help:
https://cloud.google.com/blog/products/ai-machine-learning/how-to-serve-deep-learning-models-using-tensorflow-2-0-with-cloud-functions

One account for some services

I cannot found some examples how to create a single account system for all services. For example, Google and Microsoft are use these structure. I have site and some services and I need to user registers at once and can use all service and site. But I never made this earlier and don't know even how to build so services.
Now I think make an auth service with OAuth 2 support. And my services connect to this service and authenticate in it. After the connected service gets a user ID and creates a local account with more details (which needed only for this service) and global user ID. But maybe someone know another solution. Just I don't sure that is the best solution.
P.S. I don't ask for examples of code or something else. I just need to understand the principle of operation of such related services as they interact.