Use Google Apps Script Execution API with API keys and Javascript

会有一股神秘感。 提交于 2019-12-06 16:07:12

问题


I want to create a web application for my client and use Google drive to store information. Since it's impossibe to integrate a web application from google apps script in my own website I try to use Google Apps Script Execution API and Javascript to make the interaction between my website and Google Drive.

I find out some exemple like this one : https://mashe.hawksey.info/2015/10/google-sheets-as-a-database-authenticated-insert-with-apps-script-using-execution-api/ I do be able to reproduce this example but it use an Auth authentification.

I would like to use Google Apps Script Execution API without Auth authentification but with simple API keys.

Is it possible ? And do you have an example to illustrate this.

Thank you for your help,


回答1:


Yes you can do that. Check this guide about web deployment using apps script. You just need to run the web app as your own user (parameter Execute the app as). But you will only be able to get access to your own google Drive which may not be that useful. If you want to access others' people Drive then you must run the web app as the current user but this will prompt for permissions (the first time the user access your application).



来源:https://stackoverflow.com/questions/34682857/use-google-apps-script-execution-api-with-api-keys-and-javascript

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