Google calendar api 将ics添加到Google日历的链接已停止工作

Google calendar api 将ics添加到Google日历的链接已停止工作,google-calendar-api,Google Calendar Api,我在一个网站上有一个链接,可以让用户将ICS提要添加到他们的谷歌日历中。使用此代码: http://www.google.com/calendar/render?cid=https://<etc> http://www.google.com/calendar/render?cid=https:// 它工作了3-4年,但不再有效。谷歌给我的信息是: This email address isn't associated with an active Google Calendar

我在一个网站上有一个链接,可以让用户将ICS提要添加到他们的谷歌日历中。使用此代码:

http://www.google.com/calendar/render?cid=https://<etc>
http://www.google.com/calendar/render?cid=https://
它工作了3-4年,但不再有效。谷歌给我的信息是:

This email address isn't associated with an active Google Calendar account: https://<etc>
此电子邮件地址与活动的谷歌日历帐户不关联:https://
如果我手动输入ics提要,那么一切正常:提要按照应该的方式进行解析。没有错误

知道到哪里去解决这个问题吗?

他们变得更严格了。 现在你必须使用

http://www.google.com/calendar/render?cid=http%3A%2F%2Fwww.example.com%2FCalendar%2FPublic%2520Events.ics

注意编码。

我也有这个问题。你解决了吗

我的测试表明,它在使用带有http的URL时有效,例如:

www.google.com/calendar/render?cid=http%3A%2%2Fwww.example.com%2FCalendar%2FPublic%2520Events.ics
www.google.com/calendar/render?cid=https%3A%2%2Fwww.example.com%2FCalendar%2FPublic%2520Events.ics
但是不使用https,例如:

www.google.com/calendar/render?cid=http%3A%2%2Fwww.example.com%2FCalendar%2FPublic%2520Events.ics
www.google.com/calendar/render?cid=https%3A%2%2Fwww.example.com%2FCalendar%2FPublic%2520Events.ics
我的解决方法是在链接中使用http,但在web服务器中将其重定向到https。不是很优雅,但很管用。GET不会被加密,但至少答案是


编辑:事实上,如果您不通过查询字符串参数进行更多的身份验证,则发送GET-over http而不是https可能会带来巨大的安全风险,这对于日历提要来说可能很困难。任何可以嗅探GET的人都可以通过https自己发送相同的请求。

现在它可以工作,即使使用
https

https://www.google.com/calendar/render?cid=https%3A%2F%2Fwww.example.com%2FCalendar%2FPublic%20Events.ics

对日历地址使用
webcal
协议:

https://www.google.com/calendar/render?cid=webcal%3A%2F%2Fwww.example.com%2FCalendar%2FPublic%20Events.ics

好的,所以对我来说,这页上的其他答案都不起作用。但我用其他的一些零碎的东西弄明白了:

链接到我的日历的ics:

https://example.com/calendar?id=a304036ea5a474ee5d80a100d79c231c
将其链接到Google日历的正确方法:

https://calendar.google.com/calendar/r?cid=webcal%3A%2F%2Fexample.com%2Fcalendar%3Fid%3Da304036ea5a474ee5d80a100d79c231c
这里的关键是使用webcal协议而不是https协议添加它


希望这对任何人都有帮助。

不幸的是,没有奖金。我能找到谷歌改变了这一切的链接吗?不,我必须在我让它开始工作之前破解它。我可以看到你的一个链接不起作用吗?早在2015年,谷歌似乎已经删除了这项功能(或者破坏了几个月)。我不得不提供一个用户必须复制到谷歌的网址;事实上,它是通过http而不是https工作的。但不幸的是,不是很安全。有人能确认这个URL格式仍然有效吗?如果我点击这个:--然后它会说“你没有访问权限”,但是如果我手动使用Google Calendar的“通过URL添加”功能:--那么它可以正常工作。这让我相信“自动”订阅URL格式有问题,对吗?我可以确认它也坏了。幸运的是,我的wordpress实例正在将http重写为https:(.刚刚确认,谷歌端的https可以工作,但我必须自己使用http。在我的情况下,这不好,所以我必须告诉他们如何“通过URL添加”在google calendar的网站上为我节省了30秒的生命:D