How do I register a Google cloud application? - google-api

In the Google plus Quick Start documentation:
Google Plus Quick Start Enable Google plus API
It states that a form needs to be filled out to register the app. But I can't find anything to click on to register the app. I'm wondering if the Google Console layout has changed, and the documentation hasn't been updated? I did a search on the word, "register" but didn't find anything.
The side bar on the left that I see has a list like this:
Overview
----------
APIs and auth
Credentials
Consent Screen
Push
That's what my Google Console screen looks like. I don't see any menu item for Register App

True, that part changed a bit. What you need to do now is to go to "Credentials" and create a new Client ID there. You will then find the necessary Client ID and Client secret listed on that page.

Related

How can I build a webapp which uses google calendar api without having to become verified?

What I want to build:
I want to build a website where users can connect their google calendars (this will use Google Calendar API's)
and view their calendar events, as well as edit them, and create new ones.
My problem:
In order to do so, google says my app needs to be verified, which can take weeks, and I also need to set up terms of services pages, privacy policy pages
I also need to supply authorised javascript origins which MUST start with https, which of course is a problem during development, since my origin is http://localhost
I also need to set up support emails and homepage link
Question
I just want to start building my application without having to set up a whole production-ready website eco system.
Is there anyway I can use these Google Calendar APIs for editing/creating calendar events locally, without having to set up everything mentioned above first?
Unverified apps can still be used by the developer who created the project on google developer console.
Unverified app screen
The app or script might display an "unverified app" screen before it displays the consent screen. This is based on the specific scopes that your app includes in the request.
You can still work on your app while you are going though the verification process. However that being said i would start that process asap it can take a long time to get verified.
Yes, you can. As far as I am able to tell, all the verification step does is remove the "unverified app" screen. As long as you click Advanced > Go To ... (unsafe), you should be able to create and edit calendar events for that user in your application.
In order to be able to create and edit calendar events, you need to use the most sensitive scope, which is https://www.googleapis.com/auth/calendar. I couldn't figure out how to edit and create calendar events in my web app until I changed my scope from calendar.events to calendar.
Creating Events: https://developers.google.com/calendar/create-events

How do I leave an organization on Google Play Store Developer Console that I've been added to?

I've been added in a couple of organizations on Google Play Store Developer Console but I can't get in touch with the admins, how can I leave those organizations?
Currently there is no way of doing it, but this request has been communicated to the Google Play console team.
It is now possible.
Go to Users and permissions then click on Manage on the right side of the row showing your email address. Then on the next page click on Remove user.

Unable to setup google hangout API

I have been reading google developers API document and trying to setup my private hangout chat for employees. I have created project in Console, enabled hangout API, verified domain ownership used for service and all that is listed at step one and two on this page https://developers.google.com/+/hangouts/getting-started.
When I go to page Run your app privatly on page https://developers.google.com/+/hangouts/running#running-private I cant find way to add my app as is mentioned here, because there is no Add apps link.
Move the mouse pointer to the left edge of the Hangout to reveal the
menu, choose the three dots (...), then Add apps. The app picker
appears.
Could you please help me

Create Docs through the Drive API with specific page setups (margins, orientation)

My app is already able to create Google Docs through the Drive API, and when doing so I can choose the title, data, and metadata. But I've been looking at the documentation and it seems there is no way to set some other properties of the Docs, such as the margins and the orientation (portrait or landscape) of the Docs being created. Is there a way to do so?
After not finding an answer in the documentation, the only thing I could think of was logging in with my Google Account, going to one of the created Docs, click on "Page setup", then select "Landscape", and finally "Set as default". I thought that by setting it as the default in my Google Account, it may happen that all the Docs created with it may be created as Landscapes. But it didn't work. A possible reason, however, is that the account actually creating the documents is a Service Account, not my regular Google Account. I guess both accounts, while being linked, are not the same thing, so the defaults of one don't apply to the other. Is there some way to set "Portrait" as the default orientation for the Docs created with my Service Account? If not, would the solution be to stop creating the Docs with my Service Account, and start creating them with my regular Google Account, so that the defaults I apply to them apply too to the newly created Docs?
Drive API doesn't support Docs related features for you to retrieve/set metadata about the documents.
Service accounts are individual Google accounts and no way related with your own user account. On the other hand, your default settings will only apply to you. You cant programatically set other user's defaults.
The best way I can think of, which is really a hack, is to make your own google docs API using headless chrome and pupeteer, which could be used only in part, and in connection with, the official docs API.
This is basically a web browser that runs on your server, which can be controlled to do anything a client would normally do on a web browser, like click buttons, submit forms, etc, only at the command of a server, which can be commanded through HTTP requests etc.
So after installing puppeteer, open the chromium browser, log into your google account, then open google drive with the server, and you should already be logged into the account. If not, you may have to log into the account using the server logic, which can get complicated with 2 step verification...
but anyway once you are logged into your google account on puppeteer, on drive.google.com, simply stay on that page and wait.
If the server receives some kind of HTTP request to make a new document, then have the server just literally click the new document button on the webpage, and it should open the new document in a new tab, which you should be able to access with puppeteer.
Then, when it is made, you can either just send the URL back to the request server, and / or make your page setup changes now, based on the data received in the HTTP request earlier.
For example, if, at one point (either after the document is created, or during its creation), there is some kind of message specifying the color of the background, just manually, on the server side, click File -> page setup, and select Custom, and, programmatically "type" the hex color code etc then click the OK button, then end the POST request.
If you have any questions, let me know
var doc = DocumentApp.getActiveDocument();
var body = doc.getBody();
//turn landscape if portrait
var oldHeight = body.getPageHeight();
if (oldHeight > body.getPageWidth()){
body.setPageHeight(body.getPageWidth());
body.setPageWidth(oldHeight);
}

Google API Key for translation

what key (if any) do I require for simple text translation from program?
Note: I don't host any website.
Getting a Google Translate API Key
To use the Google API, you first need a Google Cloud account.
Go to https://cloud.google.com/translate/docs/basic/setup-basic
Click Set up a project.
Name the new project in the Enable Cloud Translation API screen. Use this dialog to name your project
They may ask you to create or connect to an existing billing account. Google gives you a $300 credit to use the Cloud Translation API over a year to try it out.
Create a new service account.
This screen will pop up with your new project name and the associated service account. Click Download Private Key. This API key (written in JSON) connects your site to the Google Cloud. To enable API, download the private key.
Upload the Google Translate API key to your site. Check with your hosting company where on your system to place this key.
When you’ve placed the Google API key on your site, tell your system where to find it. Set an environment variable. Again, check with your hosting company if you don’t know how to open a terminal.
API keys are the same for all GCP APIs. Instructions here: https://cloud.google.com/docs/authentication/api-keys
Activate the Google Translate API
Before you can use a Google API in your project, you have to activate it. Go to the side menu and select the APIs & Services option:
Now you will see a screen with statistics about the APIs that you have activated. If you created the project from scratch by following the steps above, you won’t have any data yet, as you can see:
Click on the upper button Enable APIs and services to continue with the activation process of the API. This takes us to a search box where we have to look for the API we’re interested in. In this case, we want to use the Google Translate API. Type translate in the search box and click on the result Cloud Translate API:
This brings us to a screen with the description of the Cloud Translation API. Click on the Enable button to activate the API in our project:
We already have the Google Cloud Translation API activated. We’re almost there…
Create a new API Key for Google Translate
After activating the API, let’s see how to generate a new Key API to be able to use this service. We have to go to the side menu again and select the Credentials option:
On this screen we see a button with a drop-down and the text Create credentials. Don’t click on the button! Instead, open the drop-down by clicking on the arrow to the right of the button and select the API Key option.
This creates the new Key API. You can copy it if you want, although you can access it later:
Google Cloud provides us with a new Key API to use Google Translate with our third-party applications.
How to Restrict Our API Key to Protect and Limit Its Use
To control the cost of Google Cloud by using the Google Cloud Translation API (or Google Translate, which is the same), we can do two things: restrict where you can use the API Key that we just created or limit the allowed quota to use the service itself.
In the screenshot above, if you click on the Restrict Key button you will go to the API Key restriction screen that follows:
There you can select to restrict the API Key by HTTP referrers, which means that you can only make calls to the Google Cloud Translate API using the API Key from certain domain names.
You must add the valid domain names in the text box that appears when selecting the HTTP referrers option. Sample domain name https://google.com/*.
On the other hand, go to the menu API’s & Services → Dashboard → Cloud Translation API → Quotas and there you will find a box called Characters. There you can modify the quota limits of the Google Cloud Translation API and reduce them, if necessary.
The price for Google Cloud Translation API at the time of writing this post is 20 USD per million translated characters, so make your numbers.
And that’s all! You already have your API Key ready to be used with the application you want. The process is a bit cumbersome at first, but following the steps you’ll get the API Key without problems.
An API key is required to use the Google Translate API and you can get yours from the Google APIs Console.
For further details, check the Developer's Guide.

Resources