We are using the Google drive API to allow our users to browse and select a file to use in a report. One of our users (the issue is not widespread) is getting an error(below) when attempting to get a list of files.

JSON body returned from Google:

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "forbidden",
    "message": "Forbidden"
   }
  ],
  "code": 403,
  "message": "Forbidden"
 }
}

Which is a bit confusing as it is not one of the listed errors here: https://developers.google.com/drive/web/handle-errors

Does anyone have any ideas on what might be causing this? Thanks for any insight!

有帮助吗?

解决方案

It turned out to be related to this question: Getting a 403 - Forbidden for Google Service Account

This user's company did not have Google Drive as one of their activated apps.

其他提示

This error also occurs if you disable the Google Drive setting called "Allow users to install Google Drive apps". This might be a good thing to check if you are certain that Google Drive is already enabled.

enter image description here

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top