首页 > 解决方案 > 使用 Google Drive Api 获取 GoogleSheets 列表时出错

问题描述

我正在使用 google drive api 从驱动器中获取所有 google 表格

目前它给了我 403 错误我已经在开发者控制台中启用了 google drive api

在开发者控制台仪表板中,驱动 api 仍然显示 0 个请求,而其他 api 请求计数大于 100

至少没有。错误应该显示在仪表板中吗?在驱动器 api 的情况下,没有显示任何内容。可能是什么原因?

 let sheets = await axios({
      method: 'GET',
      url: "https://www.googleapis.com/drive/v3/files?q=mimeType='application/vnd.google-apps.spreadsheet' and trashed=false",
      headers: `Bearer ${token}`
    });

这是代码

标签: google-sheetsgoogle-drive-api

解决方案


推荐阅读