문제

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