0

I am working on a project which downloads files using the google drive api. I am using a service account that has all the drive permissions (https://www.googleapis.com/auth/drive).

I am able to download some files without any problems, but sometimes I get the following error:

{
    "error": {
        "errors": [
            {
                "domain": "global",
                "reason": "insufficientFilePermissions",
                "message": "The user does not have sufficient permissions for this file."
            }
        ],
        "code": 403,
        "message": "The user does not have sufficient permissions for this file."
    }
}

When I attempt to download a file I impersonate the owner of the file. The owner of the file will definitely have access to the file so I am not sure why I am getting this error.

Is anyone able to explain how I could possibly be getting this error?

brad mcallister
  • 419
  • 2
  • 13

1 Answers1

0

The problem was that the user I was trying to impersonate was suspended.

brad mcallister
  • 419
  • 2
  • 13