Google spreadsheet api Request had insufficient authentication scopes

前端 未结 9 1781
既然无缘
既然无缘 2020-11-29 07:45

I\'m making an script to read data from google spreadsheet using the following script on nodejs:

var url = oauth2Client.generateAuthUrl({
    access_type:            


        
9条回答
  •  独厮守ぢ
    2020-11-29 08:24

    First, make sure you also enable the Sheets API in your Developers Console.

    The insufficient authentication scopes is an error in the OAuth 2.0 token provided in the request specifies scopes that are insufficient for accessing the requested data.

    So make sure you use the correct and all necessary scope and check this Authorizing requests with OAuth 2.0 if you properly follow the steps here.

    Lastly, try to revoke the access and try to redo it.

    For more information, check this related SO question:

    • Write to GoogleSheet via API with Java

    • Google Spreadsheets API with OAuth2.0 using Javascript

提交回复
热议问题