如何在没有 oAuth 身份验证的情况下连接到 Google Calendar API? [英] How do I connect to the Google Calendar API without the oAuth authentication?

查看:29
本文介绍了如何在没有 oAuth 身份验证的情况下连接到 Google Calendar API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究 Google Calendar API 和有关身份验证的文档 (http://code.google.com/apis/calendar/v3/using.html#auth).似乎这里提到的用例是编写一个访问用户日历的应用程序.但是,我正在编写一个网页,该网页将访问网站所有者的日历并仅显示该日历的信息.所以,我不希望用户输入他们的 Google 帐户信息,而这正是 oAuth 想要做的.

I have been studying the Google Calendar API and the docs on authentication (http://code.google.com/apis/calendar/v3/using.html#auth). It seems that the use case mentioned here is writing an application that accesses the user's calendar. However, I am writing a web page that will access the web site owner's calendar and display just that one calendar's information. So, I don't want the user to enter in their Google account information which is what oAuth wants to do.

基本上,我正在寻找一种方法来访问单个私人 Google 日历并通过将凭据直接传递给服务来对其进行身份验证.

Basically, I am looking for a way to access a single private Google calendar and authenticate to it by passing the credentials directly to the service.

这里有一个类似的问题:如何在 Google 日历中使用 OAuth 以仅访问一个日历?这似乎表明海报最初是直接传递凭据的.这个功能还能用吗?你如何处理我描述的用例?

There is a similar questions here: How to use OAuth with Google Calendar to access only ONE calendar? that seems to indicate that the poster originally was passing the credentials directly. Is this feature still available? How do you handle the use case I described?

推荐答案

我有同样的问题.我发现这 3 部分教程正是您想要的.预订网页
您创建了一个直接写入您自己的日历(而不是用户)的网页,这就是为什么用户不必授予您访问其日历的权限.
这个解决方案对我有用,但你必须直接用 REST 管理它.

我正在寻找一种使用 google api php 客户端的方法,因为它看起来有点简单.但我还没有找到一种方法来正确编辑 google-api-php-client/src/config.php 文件,以在其中验证自己而不是实际用户的方式工作,因为您需要访问您的日历.如果有人有可以做到这一点的想法或脚本,我将不胜感激.

I have the same problem. I found this 3 part tutorial that makes exactly what you want . Web page for bookings
You create a web page that writes directly into your own calendar (not the users) and that is why users don't have to give you permission to access their calendar.
This solution works for me, but you have to manage it directly with REST.

I am looking for a way to use google api php client because it seems a bit simpler. But I have not yet found a way to how to properly edit the google-api-php-client/src/config.php file to work in a way where you authenticate yourself not the actual user, because you need access to your calendar. If anyone has an idea or a script that would do that I would be very grateful.

这篇关于如何在没有 oAuth 身份验证的情况下连接到 Google Calendar API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆