如何使用客户端令牌将事件从服务器插入Google日历 [英] How to insert events into Google Calendar from server with client token
问题描述
我需要从Python服务器向Google日历帐户插入事件,但是我的应用程序流程是:
I need to insert events to a Google Calendar account from a Python server, but the flow of my application is:
- 用户下载并安装android应用
- 用户选择一个Google帐户
- 在Android应用中生成令牌
- 令牌通过https发送到服务器
- 服务器经过一些处理后,通过收到的令牌将新事件插入Google日历
问题是:
- 此流程有用吗?
- 我需要在服务器和android应用上使用哪些库?我已经阅读了官方文档,但对于应该使用什么感到困惑.
- 我需要知道其他吗?
此刻,我可以登录android应用,但我不知道如何获得所需的权限.
At this moment, I can login in the android app, but I don't know how to get the desired permissions.
推荐答案
在Oauth令牌过期后,如果您的服务器已完成处理,请确保也获取刷新令牌.您可以在服务器上使用Calendar Python客户端库( https://developers. google.com/google-apps/calendar/downloads ),并且有一个Java客户端库可供您在客户端上使用(
Make sure to get a refresh token too in case your server is done processing after the Oauth token has expired. There is a Calendar Python client library that you can use on the server (https://developers.google.com/google-apps/calendar/downloads) and there is a Java client library you should be able to use on the client (https://developers.google.com/accounts/docs/OAuth2InstalledApp#libraries).
这篇关于如何使用客户端令牌将事件从服务器插入Google日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!