title: Gmail API "Error 403: Request had insufficient authentication scopes" with Go language
body: <p>Following the Go Quickstart instructions <a href="https://developers.google.com/gmail/api/quickstart/go" rel="nofollow noreferrer">here</a> , enabled the Gmail API, downloaded the client configuration and then executed quickstart.go.  The following line shows the GmailSendScope is being requested.</p>
  <pre><code>config, err := google.ConfigFromJSON(b, gmail.GmailSendScope)
  </code></pre>
  <p>Followed the rest of the instructions. While saving the token.json, the program displayed following message:</p>
  <pre><code>Saving credential file to: token.json
  2020/10/07 12:36:13 Unable to retrieve labels: googleapi: Error 403: Request had 
  insufficient authentication scopes.
  More details:
  Reason: insufficientPermissions, Message: Insufficient Permission
  </code></pre>
  <p>On the developer console, I do see Oauth client of type Desktop for Quickstart project and the security screen did show that I am allowing application to send emails using my gmail account.</p>
  <p>I am not sure how to fix this issue.</p>
  <p>macOS Catalina 10.15.7,  go1.15.2 darwin/amd64</p>
  <p>Thanks for help!!!</p>