“PERMISSION_DENIED” on Google Spreadsheet REST API v4

拜拜、爱过 提交于 2019-11-29 11:55:12

First, make sure you have a permission to call this spreadsheet and you enable the Sheets API in your developer console. You can also try to change the privacy settings of this spreadsheet to public and checked if you can access it now. This 403 error is usually caused by incorrect or missed some configuration in Authorizing Requests. If you authorizing requests with OAuth 2.0, make sure you use the proper scope with it.

For more information, you can check this thread on how to debug your Google OAuth 2.0 token when you get HTTP 401s or 403s

You have to append the string "key=yourAPIkey" as query on your URI. The API key is generated in the developer's console

If you update application access scope you have to re-authenticate the application and update credentials.json. In google-sheet quick start guide, they have started the tutorial with only read scope. If you want to write or update google-sheet later you will have to change the scope there and update the credentials.json again Look carefully when you first authenticate it only giving permission to read. But if update scope and try to re-authenticate it will ask for permission to read and manage sheet permission.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!