Google Sign-in and Google Sheets API V4 - google-api

I am trying without success to "Add Google Sign-In to Your Web App" and then use Node.js with Google Sheets API V4 to be able allow my app to use the sheets api on behalf of the user (with scope: https://www.googleapis.com/auth/spreadsheets).
I'm really confused on how to achieve this. Reading through most of the documentation from OAuth2 doesn't clarify me best practices to achieve this with the Google Sign-In button.
Furthermore, I haven't found any documentation/guides related to this. I was hoping someone can guide me towards the right direction.
P.S: I managed to use the sheets api by following the Node.js quickstart for Sheets API, which allows me to achieve authorization through console, however I believe using the Sign-In button might simplify the process while making a nicer UX.
Thanks!

Google Sign-In is like what it says, for signing-in. However, it's not enough to authorize you to use Sheets API methods because if you read the Authorize Requests docs, it clearly states that you need to use OAuth2 plus there are scopes to consider (read-only, read/write, etc).
You are correct to follow the guidelines where you used OAuth2.0. Just create your own custom button. Grab a Google button image in the web and use that.

Related

How to get the get API path and parameters of Google play developer API?

I have added a non-renewable subscription for one of my projects. We also started implementing the Google play developer API to get the subscription latest status from the Play Store. For that we have done the below steps as per this blog:
Linked the developer account to a new Google Cloud Project.
Enabled the Google Play Developer API for the Google Cloud Project.
Created a service account and created a key for the service account.
I have below clarifications related to this implementation:
I tried to Grant Access for the following permissions: But the corresponding checkmark is not clickable.
View financial data, orders, and cancellation survey responses
Manage orders and subscriptions
The 3rd step as per the blog is to Authorize an API key, but I didn't get a clear idea of that.
We are going to implement this API on the back end side as a corn job, do we need to generate a JWT token for accessing this API? Is this possible to call without a Token? I found 2 types of implementations from this blog, which one is easy and secure?
"Your application can complete these tasks either by using the Google APIs client library for your language or by directly interacting with the OAuth 2.0 system using HTTP."
From where we get the get API path and other details. I found a similar get API from AppStore like this. Is the play store providing a similar kind of get API?
We need the latest purchase status API and for that what parameters do we need to pass?

Google integration in web application

I want to integrate gmail and google calendar in my web application. I can login via google and make api calls to either gmail OR google calendar API, depending on the authorisation that I request from google.
I have not found a way to request authorisation for more than one APIs simultaneously. Is this even possible? Is it possible to receive one access token in order to use it for requests against more than one of Google's APIs?
As far as I know it can be done. If you try testing it in Google Oauth 2.0 Playground and select multiple API scopes.
"scope": "https://www.googleapis.com/auth/calendar https://mail.google.com/ https://www.googleapis.com/auth/drive"
It should look like this:
Hope this helps.

Google Speech API still supported?

I just tried to register a project for use with the Google Speech API, and I couldn't see the API in the the list when I filtered it for the words "speech" or "voice". Is the API still supported?
I just found the new Web Speech API here Did this take the place of the Speech API v2?
You have to be a member of chromium-dev discussion list before you can enable the Speech API in your Google Developers Console.
Go to Chromium Dev group and click Join the list.
Go back to Google Developers Console, select your project, enter APIs & Auth / APIs. You'll now see Speech API. Click to enable it.
Go to Credentials, Create new Key, Server Key. You may optionally specify a list of IPs, for security.
You now may make queries to Google Speech API v2. Keep in mind that this is an experimental API, and limited to 50 queries per day per project.
Please read this older post..
Answered by #gui-ambros
May this help you a little...

Gem to post message on google plus?

Is there any gem to post message on google plus from our rails application ?. I want to post a meesage on my google plus page whenever i logged in my application using google plus credentials. Please suggest me the gem name to do this. Thanks in advance.
EDIT
I have a app in goole plus. On behalf of my application users, my app should post messages.
I suggest to use gem 'google_plus'`
As Google plus having so many restrictions. Still I would Like to Share a link you can follow that..
How to share content from our site to google plus
For more reference:
https://developers.google.com/accounts/docs/OAuth2
https://developers.google.com/+/web/share/interactive#button_attr_calltoactionurl
I hope it will work fine...
Yes, there's a Ruby client library provided by Google which allows you consume their Google+ API
https://developers.google.com/api-client-library/ruby/apis/plus/v1
UPDATE
The URL above points to Ruby client library. The API you're looking for is moments.insert
https://developers.google.com/+/api/latest/moments/insert
There is an official Google API Client gem. However the Google+ API does not allow standard automated posting to a profile. The recommended approach to share posts is the share button or the interactive share API.
The automated posting that Google+ does support are:
App activities/moments are a way to make actions within your app visible to other users of your app. They do not appear in the Google+ posts stream.
Domains API can be used with Google Apps accounts to create posts that are limited to users within the company.
Pages API can be used to post to a page (not a profile) but is limited to approved partners.

How to programmatically add people to a Google+ circle using cURL?

If you own a page that has a circle, and you'd like to add people to that circle programmatically, how would you do so? Would it be something similar to:
curl `ruby file_that_outputs_new_people_to_add.rb` 'https://plus.google.com/{pageid}'
What other attributes would you need to include and where in this process would you add oAuth details?
You can't... yet. From the Google+ API documentation:
Note: The Google+ API currently provides read-only access to public data. All API calls require either an OAuth 2.0 token or an API key.
Read-write access with three-legged OAuth is planned, but until there's a documented API for that functionality, there really is no way to do what you're asking.
They offer it now in Google+ Domains API under Circles and addPeople. https://developers.google.com/+/domains/api/circles/addPeople
I recommend looking at Google's own "Google API Client". They have a method which discovers their own API: API Discovery

Resources