Search code examples
google-apigoogle-appsgoogle-authentication

Changing request level for google project


How do I lower the requested access level of an existing google project? It's currently asking for:

  • View your email address
  • View your basic profile info
  • Manage your contacts

When all I really want is to authenticate a user for login purposes, and I think all I need for that is:

  • Have offline access

Solution

  • One of the parameters you are passing when you create a credential is called scope, and contains a list of each of the services your users must authorize.

    From the OAuth 2.0 docs, scope contains a string or iterable of strings. Change it to the new scopes you want.