node js with gmail api, The API returned an error: Error: unauthorized_client

前端 未结 1 1212
深忆病人
深忆病人 2020-12-20 18:56

Edit: The error is happening on on this piece of code:

   var gmail = google.gmail(\'v1\');
      gmail.users.labels.list({
        auth: auth,
        userI         


        
相关标签:
1条回答
  • 2020-12-20 19:26

    I did a console.log on TOKEN_PATH, it gave me the path of where the file was.

    I had to delete the file

    /Users/user/.credentials/gmail-nodejs-quickstart.json
    

    which was a hidden folder I could not find on my mac.

    0 讨论(0)
提交回复
热议问题