title: Error 'Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup' on API call
body: <p>Trying to make my expressJS app control users' google drive files. I've been utilizing the node 'googleapis' package. After following a slightly dated/incorrect article <a href="https://medium.com/@jackrobertscott/how-to-use-google-auth-api-with-node-js-888304f7e3a0" rel="nofollow noreferrer">here</a>, I've gotten the script to:</p>
  
  <ul>
  <li>redirect a user to their authorization url</li>
  <li>grab the 'code' from get parameter and then...</li>
  <li>register it back as access tokens, which can then be used to...</li>
  <li>create a registered 'auth' object</li>
  </ul>
  
  <p>When I use this to create the drive object and try to get it to list files, I get the following error: 'Error: Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup'</p>
  
  <p>This error has already popped up on <a href="https://stackoverflow.com/questions/19335503/keep-getting-a-daily-limit-for-unauthenticated-use-exceeded-continued-use-requ">SO question</a>, and on <a href="https://github.com/nao-pon/flysystem-google-drive/issues/22" rel="nofollow noreferrer">github</a>.</p>
  
  <p>Following general advice, I re-enabled the drive api, re-downloaded access key. I've also tried replacing the sensitive drive scope a gmail scope, but that didn't work either. I'm not sure where else turn to start debugging at this point. I have a sneaking suspicion my entire auth object is being formed incorrectly but I can't find anything wrong.</p>
  
  <p>This is the related piece of Express app code I'm using to create the authObject and then read drive files.</p>
  
  <pre><code>/**
   * Google Utility class that packages different actions related to authentication
   */
  class GoogleUtil {
    constructor(secretFileName = 'client_secret.json') {
      const secret = JSON.parse(fs.readFileSync(secretFileName)).web;
      const { client_id, client_secret, redirect_uris } = secret;
      this.client_id = client_id;
      this.client_secret = client_secret;
      this.redirect_uri = redirect_uris[0];
      this.standardScope = [
        'https://www.googleapis.com/auth/drive',
        // 'https://www.googleapis.com/auth/gmail.readonly',
        // 'https://www.googleapis.com/auth/userinfo.profile'
      ];
    }
  
    createConnection() {
      return new google.auth.OAuth2(this.client_id, this.client_secret, this.redirect_uri); // form authObject
    }
    getConnectionUrl(auth) {
      return auth.generateAuthUrl({
        access_type: 'offline',
        prompt: 'consent',
        scope: this.standardScope
      });
    }
    async getAccessTokenFromCode(code) {
      var auth = this.createConnection();
      const data = await auth.getToken(code);
      return data.tokens;
  
    }
  }
  const g = new GoogleUtil();
  
  
  /**
   * BEGIN ROUTE DEFINITIONS
   */
  
  // THIS IS FIRST STEP. FRONTEND WILL REDIRECT TO GIVEN URL
  app.get('/api/googleLoginUrl', async (req, res) =&gt; {
    const oAuth2Client = g.createConnection();
    const url = g.getConnectionUrl(oAuth2Client);
    res.json({ url });
  });
  
  
  // *****
  // NOTE: THIS IS ROUTE THAT ATTEMPTS TO LIST FILES AND THROWS ERROR
  // *****
  app.get('/google-auth-redirect', async (req, res) =&gt; {
    if (!req.query.code) return res.send('Malformed request');
  
    const tokens = await g.getAccessTokenFromCode(req.query.code);
    const auth = g.createConnection().setCredentials(tokens);
  
  
    const drive = google.drive({ version: 'v3', auth: auth });
    drive.files.list({
      pageSize: 10,
      fields: 'nextPageToken, files(id, name)',
    }, (err, resp) =&gt; {
      if (err) return console.log('The API returned an error: ' + err);
      console.log(resp);
    });
  
    res.redirect('/');
  });
  </code></pre>
  
  <p>In the google developer console, clicking on 'create credentials' in the drive API overview informs me that my current credentials are compatible. The project scopes do include ' ../auth/drive'.</p>
  
  <p>I'd want it to be able to list files from an authenticated user's account.</p>