使用OAuth通过本机客户端(.Net)访问受保护的Google Apps脚本Web服务 [英] Access a Protected Google Apps Script Web Service via a Native Client (.Net) using OAuth
问题描述
我的.Net客户端应用程序(Winform)允许用户使用浏览器控件在Google上进行身份验证.我可以在响应中检索access_token(我按照此处的说明进行操作). 获得此access_token后,如何使用它来获取"(或POST)到受保护的Google Apps脚本.例如,如果我有一个Web服务URL https://script.google.com/macros/s /XYXYXYXYXYX ,它设置为以经过身份验证的用户身份运行.有没有一种方法可以使用作为身份验证用户的access_token(通过某些特殊的HTTP标头或.Net Client Oauth库)下载URL? 此处的说明仅显示如何访问受Google保护的API(而非Google Apps脚本).需要明确的是,我不希望在Apps脚本中访问任何Google API.只是由Google Apps脚本生成的一些简单的XML动态XML或JSON文档. 谢谢.
My .Net Client Application (Winform) allows users to use a Browser Control to Authenticate on Google. I am able to retrieve the access_token in the response (I follow the instructions here). Once I get this access_token, how can I use it to 'GET' (or POST) to a protected Google Apps Script. For instance, if I have a web service URL https://script.google.com/macros/s/XYXYXYXYXYX, that is set to run as the Authenticated User. Is there a way that I can download the URL using the access_token (either via some special HTTP Header or a .Net Client Oauth Library) acting as the user who authenticated ? The instructions here only show how to access API's protected by google (not Google Apps Scripts). To be clear, I am not looking to access any Google API's in the Apps Script. Just some simple XML dynamic XML or JSON documents that are generated by Google Apps Script. Thanks.
推荐答案
Apps脚本不支持传入的OAuth.
Apps Script does not support incoming OAuth.
这篇关于使用OAuth通过本机客户端(.Net)访问受保护的Google Apps脚本Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!