title: Google API (Sheets) API Error code 403. Insufficient Permission: Request had insufficient authentication scopes
body: <p>I am trying out a project where I am able to use python (im using jupyter notebooks on Anaconda) to read data from google sheets. I watched a few videos and guides and replicated the code. However, I am unable to get the code to work correctly</p>
  
  <pre><code>import pandas as pd
  import gspread
  from oauth2client.service_account import ServiceAccountCredentials
  scope = ['https://spreadsheets.google.com/feeds','https://www.googleapis.com/auth/drive']
  creds = ServiceAccountCredentials.from_json_keyfile_name('test.json',scope)
  client = gspread.authorize(creds)
  data = gc.open('TEST').sheet1
  print(data.get_all_records())
  </code></pre>
  
  <p>The error message I got was</p>
  
  <pre><code>APIError: {
   "error": {
    "errors": [
     {
      "domain": "global",
      "reason": "insufficientPermissions",
      "message": "Insufficient Permission: Request had insufficient authentication scopes."
     }
    ],
    "code": 403,
    "message": "Insufficient Permission: Request had insufficient authentication scopes."
   }
  }
  </code></pre>
  
  <p>Any advice on what I should do?</p>