Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Contacts read only (OAuth 2.0)

We're using OAuth 2.0 to access Gmail Contacts. Do you know if it is possible to request access (scope) in such a way that the authorization pop-up indicates that we need read only access.

Right now the pop say says "Manage your contacts" - view and manage your Google Contacts. This "manage" part is discouraging to many users while all we need is to view them.

So far we tried the following scopes but the pop-up is the same ("Manage contacts"): - https://www.google.com/m8/feeds/ - https://www-opensocial.googleusercontent.com/api/people

Thanks, Piotr

like image 710
Piotr Avatar asked Sep 23 '11 15:09

Piotr


People also ask

How to connect to Google API using OAuth?

To begin, obtain OAuth 2.0 client credentials from the Google API Console. Then your client application requests an access token from the Google Authorization Server, extracts a token from the response, and sends the token to the Google API that you want to access.

What is OAuth2 in Android?

OAuth 2.0 is the standard that most apps and services follow today, including Google. In this post, you will learn how to integrate with the Google APIs via OAuth 2.0 so you can enable users to log into your app using their Google account.

What version of OAuth does Google use?

Note: Use of Google's implementation of OAuth 2.0 is governed by the OAuth 2.0 Policies. Google APIs use the OAuth 2.0 protocol for authentication and authorization.

Does Google oAuth work on limited input devices?

Applications on limited-input devices. The Google OAuth 2.0 endpoint supports applications that run on limited-input devices such as game consoles, video cameras, and printers. The authorization sequence begins with the application making a web service request to a Google URL for an authorization code.


2 Answers

Yes, there is, just use https://www.googleapis.com/auth/contacts.readonly as the scope and it will say "View your contacts".

Hope that helps!

like image 198
Arkanoid Avatar answered Sep 22 '22 10:09

Arkanoid


For contacts, the lowest granularity of scope that google has is read/write. Read only access is not available.

like image 21
Mark S. Avatar answered Sep 18 '22 10:09

Mark S.