According to the Google Translate API docs, https://cloud.google.com/translate/v2/using_rest, you can authenticate with OAuth 2.0 or an API key.
All of the examples online I've seen simply provide an API key.
Do you know how to run a Google Translate API call with an OAuth 2.0 access token?
Related
There seems to be very little information about getting started with Google's Drive REST API, besides the Quickstarts section (https://developers.google.com/drive/api/v3/about-sdk). I am trying to use their API in AutoIt, but I can't seem to find out how to generate an access token without using one of the available quickstart libraries. I am aware of the REST API docs (https://developers.google.com/drive/api/v3/reference/), but still, can't find anything about generating the access token. I have already generated a Client ID and a Client Secret though. Any help is appreciated.
Google's OAuth endpoints can be used with any library (or you could roll your own, but there are plenty of quality libraries). There is plenty of documentation of OAuth2 at Google, and there is the OAuth2 Playground where you can experiment with OAuth and the Google APIs.
If you have a library, Google's OAuth endpoints are available in the OpenIdConnect discovery doc at https://accounts.google.com/.well-known/openid-configuration
I am building a speech to text application for browser. Right now I am recording and sending the voice from frontend to backend, from backend calling the google api for converstion. Now the problem is processing time is high.
what I need is to call the google api from frontend itself. problem with this step is api key is getting exposed to user and leads to security issue.
So can I generate a session based auth token for speech to text api, which will be valid for client for some duration of time. any tutorial link will also do.
Just about everything Google creates supports OAuth 2.0. Text to Speech certainly does.
Authenticating is easy. Here is a link on how to use OAuth 2.0 with Google APIs.
Using OAuth 2.0 to Access Google APIs
Here is link on how to integrate Google Sign-In to your Web App:
Add Google Sign-In to Your Web App
And a link for adding OAuth 2 to your backend server in PHP:
Using OAuth 2.0 for Web Server Applications
I would use Google Accounts to start. Google Sign-In makes this easy to implement for the client. Either implement OAuth 2.0 on the backend (recommended) or on the client.
Once you complete the OAuth 2 flow, you will have a token that consists of an Access Token, Refresh Token and Client ID Token. You will use the Access Token to authorize API calls. You will use the Refresh Token to refresh the Access Token as it expires every 60 minutes. The Client ID Token will provide you with their identity information.
I am implementing Login with Google using OAuth API but I can't find it to enable it on Google Developer console.
We need to enable Google+ API to implement Google OAuth in application.
What we want to do is to use Spreadsheet API and Calendar Resource API and to access to the API with 2-legged OAuth.
(Most likely, Service Account Authentication method in OAuth 2.0 is similar method. <2LO
To use these API, we tried Service Account Authentication method and successed in it.
However, the way of authentication with Service Account is not on the documents below. As for Spreasheet API, it should be used with OAuth 1.0 if implementing 2-legged OAuth. In terms of Calendar API, it should be used with 3-legged OAuth.
The success of retrieving data with Service Account is good for us and we ant to go on with it. But since the document doesn't tell us the way, we are confused if this is correct way. Can you tell me the way is whether formal admitted way by Google?
Spreadsheet API:
https://developers.google.com/google-apps/spreadsheets/?hl=ja#about_authorization_protocols
Calendar Resource API:
https://developers.google.com/admin-sdk/calendar-resource/auth
Thanks,
All Google APIs now support OAuth2, including service accounts. The documentation for these APIs hasn't been updated to reflect the change, but it should work correctly.
Is it a valid practice to associate the AccessToken retrieved from Google Client API (Service Account)
and use it in GData API ?
The reason is that Google Client API uses OAuth 2.0 and GData API uses the older version of OAuth 1.0.
So will it work ?
The GData API can also use OAuth2. See the revelant doc for two very common GData APIs :
Contacts
Spreadsheet