title: Google Analytics API insufficient_scope error
body: <p>all. I am currently working on a go project that requires me to connect to Google Analytics API v3. I am authenticating using service account method. I am pretty sure that I am able to authenticate but I am getting "insufficient_scope" error. I am not sure what's going on here.</p>
  
  <p>My config struct</p>
  
  <pre><code>config := &amp;jwt.Config{
          Email:settings.Client_email,
          PrivateKey:[]byte(settings.Private_key),
          Scopes: []string{
              "https://www.googleapis.com/auth/analytics.readonly",
          },
          TokenURL: google.JWTTokenURL,
      }
  </code></pre>
  
  <p>The response header</p>
  
  <pre><code>Cache-Control:[private, max-age=0] 
  X-Xss-Protection:[1; mode=block] 
  Alt-Svc:[quic=":443"; p="1"; ma=604800] 
  Date:[Fri, 23 Oct 2015 17:45:13 GMT] 
  X-Content-Type-Options:[nosniff] 
  X-Frame-Options:[SAMEORIGIN] 
  Server:[GSE] 
  Alternate-Protocol:[443:quic,p=1] 
  Vary:[Origin X-Origin] 
  Content-Type:[application/json; charset=UTF-8] 
  Www-Authenticate:[
    Bearer realm="https://accounts.google.com/", 
    error=insufficient_scope,
    scope="https://www.googleapis.com/auth/analytics"
  ] 
  Expires:[Fri, 23 Oct 2015 17:45:13 GMT]
  </code></pre>