I'm trying to access some documents stored in a team Google Drive using JavaScript and Google's RESTful API.
I set up an API key in the developer console, and restricted it to my IP. Everything works fine for some documents - I can export a Google Doc as HTML and render it on my page. The same pages work in Postman, too.
However, some pages I get the following error:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "File not found: eg_xuQ5gXMWGPeUtf8mTZ7VhEYW_DIH6XK__lC1w0rMo",
"locationType": "other",
"location": "file"
}
],
"code": 404,
"message": "File not found: eg_xuQ5gXMWGPeUtf8mTZ7VhEYW_DIH6XK__lC1w0rMo"
}
}
I know the fileId
is correct, yet I still get a notFound
response. I suspect this is about permissions, but when I compare docs that work against ones that don't, I can't see any differences on the surface.