title: Google API insufficient permissions
body: <p>I'm trying to add a gmail user to a group using google's api in python.
  Here's my code:</p>
  
  <pre><code>from __future__ import print_function
  import httplib2
  import os
  from apiclient import discovery
  from oauth2client import client
  from oauth2client import tools
  from oauth2client.file import Storage
  
  try:
      import argparse
      flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args()
  except ImportError:
      flags = None
  
  # If modifying these scopes, delete your previously saved credentials
  # at ~/.credentials/admin-directory_v1-python-quickstart.json
  SCOPES = 'https://www.googleapis.com/auth/admin.directory.group'
  CLIENT_SECRET_FILE = 'client_secret1.json'
  APPLICATION_NAME = 'Directory API Python Quickstart'
  GROUP = 'customerservice@zego.com'
  
  
  def get_credentials():
      home_dir = os.path.expanduser('~')
      credential_dir = os.path.join(home_dir, '.credentials')
      if not os.path.exists(credential_dir):
          os.makedirs(credential_dir)
      credential_path = os.path.join(credential_dir,
                                     'admin-directory_v1-python-quickstart.json')
  
      store = Storage(credential_path)
      credentials = store.get()
      if not credentials or credentials.invalid:
          flow = client.flow_from_clientsecrets(CLIENT_SECRET_FILE, SCOPES)
          flow.user_agent = APPLICATION_NAME
          if flags:
              credentials = tools.run_flow(flow, store, flags)
          else: # Needed only for compatibility with Python 2.6
              credentials = tools.run(flow, store)
          print('Storing credentials to ' + credential_path)
      return credentials
  
  def main():
      credentials = get_credentials()
      http = credentials.authorize(httplib2.Http())
      service = discovery.build('admin', 'directory_v1', http=http)
  
      groupinfo = {'email': 'david.bien@zego.com',
                    'role': 'MEMBER',
                    }
      service.members().insert(groupKey=GROUP, body=groupinfo).execute()
  
  
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p>Whenever I run this I get the following error:</p>
  
  <pre><code>HttpError: &lt;HttpError 403 when requesting https://www.googleapis.com/admin/directory/v1/groups/customerservice
  %40zego.com/members?alt=json returned "Insufficient Permission"&gt;
  </code></pre>
  
  <p>So far I have done the following to troubleshoot this:</p>
  
  <ol>
  <li>I tested the quickstart code from google and it worked.</li>
  <li>I tried out oauth playground and I entered the same json data and it worked</li>
  </ol>
  
  <p>I am not sure what exactly is the issue here. Scope is correct(worked in oauth playground), code seems to be correct(request worked in oauth playground). The only thing I can think of is request type? 
  I would appreciate any help.
  Thanks.</p>