Google cloud - enable billing on project programactally - api

I have a web app deployed in a GCE instance since last year, but yesterday my access to this instance was suspended since my free credits ended so i need to enable billing on my project.
I forgot my email address to enter in my google cloud account, so i can't log in and enable billing on my project. I have valid credentials that i used to interact with Google Compute Engine, it's possible to enable billings on my project using some google cloud api?
I've searched here: https://cloud.google.com/billing/reference/rest/?apix=true#rest-resource-v1billingaccounts but not found anything.
How can i enable billing on my project using the api?

Related

Add Google Cloud service account to Google Play Console Api Access

is it possibe to add a Google Cloud service account json done with a different gmail account to a Google Play console api access with different gmail account?
Google Cloud service account (gmail1) -> Google Play Api Access (gmail2)
I want to use an already existing cloud platform profile, only thing is I created Google Play console profile with another gmail, is it possible to manually add the json?
https://play.google.com/console/u/0/developers/7136348775757715460/api-access
Can't do it from here...

Can we use existing google calendar api in multiple domain?

Hope you are doing well..!!
I have a question , I have an existing website where already integrated google calendar api . Now I have another new website so my question here is , may I use existing website google calendar api in this new domain or not ?
or need to buy for new domain again ?
Thanks,
Anks
If you have a website that users Google calendar api. So you have created a project on Google cloud console. either with service account credentials or web credentials. That is considered to be a single application.
When you go and create a new website and which to also use an api you should create a new project on Google cloud console for this application. The main reason for this would be quota. If you use the same project on google cloud console then both websites would be sharing the quota.
I cant tell you if you need to buy a new domain name for your website i guess that would depend upon your needs. If by domain you mean google workspace domain. Assuming you are using service accounts to store the web app calendar data, i dont see any reason it couldn't be under the same workspace domain. Just make sure you create separate projects in google cloud console to avoid the quota issue i mentioned.

Using Google Accounts for Authentication and Google APIs in Compute Engine

The Google App Engine standard environment allows easy integration with Google accounts for user authentication, Cloud Datastore and with APIs such as Gmail API, Google Calendar etc.
Are these same features available in Compute Engine also? I mean can I deploy a web application in a Tomcat container in a Compute Engine VM and use Google Accounts for authentication, Cloud Datastore for persistence and APIs such as Google Plus and Google Calendar for reading users' personal information?
I found this URL that says Cloud Datastore can be used from Compute Engine but could not find similar documentation about usage of Google Accounts for authentication and usage of APIs like Google Plus and Google Calendar.
Yes you can.
You can use all Google APIs (Gmail API, Google Calendar etc) from tomcat and from any other web container. You simply need to provide the credential to connect to the Google APIs. HERE how can you obtain the credential on a server side web application, please note that the documentation it's not referring to any specific web container.
Appengine provides out of the box a simpler way to authenticate Google user through the UserServiceFactory. This service it's not available outside the AppEngine Enviroment because it comes with the AppEngine SDK.
In order to use the Google Cloud Datastore from outside of the AppEngine environment you need to use the Remote API. With this api you will be able to access the Datastore service.

Google Cloud Messaging Business setup

I'm trying to find out how Google Cloud Messaging should be setup for businesses.
Currently I'm using my private Google account to manage the Google Developer Console and create a GCM project for my application. But what if I where e.g. a consultant agency developing an app for a customer, how would GCM be setup then?
I'm trying to answer the following questions:
Is there a way to create a Google account for Business that should be used instead?
Is it still free of charge?
Should the customer have and manage this account or do I as a developer/provider of the app manage this account?
Thanks in advance
From the documentation:
Google Cloud Messaging (GCM) is a free service that enables developers to send messages between servers and client apps.
Your Questions:
Is there a way to create a Google account for Business that should be
used instead?
Gcm does not require a special type of Google Account. Once you can create a Project in the Google Developer Console then you can use GCM with that project.
Is it still free of charge?
Yes it is free, even in business use cases.
Should the customer have and manage this account or do I as a developer/provider of the app manage this account?
This is up to you, it would depend on what the future relationship between the developer and the owner of the application is.

Switching from Google provisioning API to JSON service authorizing through oauth2

I'm just getting started porting my old code over to the new google apps json service but I'm not clear on the oauth.
I'm looking at:
https://developers.google.com/admin-sdk/directory/v1/guides/prerequisites
It says:
"Set up a new project in the Google APIs Console and activate Admin SDK service for this project. See the Google APIs Console Help in the upper right corner of the Console page for more information about creating your API project. "
My product gets installed at each client location. Do I create the app using my key then distribute this to my customers or do I use their key in my app that runs at their site? Do I also need to enable the admin SDK in addition to enabling API access?
Do I create the app using my key then distribute this to my customers or do I use their key in my app that runs at their site?
Do they have access to the source code? If true then it will be known to them.
Whether it is your key (an API project owner by you) or theirs depends on the kind of software you offer (tailored or common service (webapp?)) and who will be responsible of the quotas, billing (if needed) and maintenance.
Do I also need to enable the admin SDK in addition to enabling API access?
Yes.
FYI:
API projects can hold up to 20 accounts
Users can own several projects (don't know how many)
Projects can be shared with other users or Groups