0

我正在尝试使用 Java 为 Google Task API 构建一个同步应用程序。我还有一个额外的限制是使用 2-legged OAuth。我关注了针对 Google Apps 域管理员使用带有 Google Tasks API 的 2-legged OAuth的文章,但他们为 Java 提供的代码示例无法使用最新的 API 库进行编译。

此外,还有很多关于 Google Tasks 的材料,但要么已弃用,要么使用了不存在的 API/参考。如果有人可以向我指出相关文章或工作示例,那将是非常有帮助的。

我提到的文章和网站: https ://developers.google.com/google-apps/tasks/ 谢谢

4

1 回答 1

0

Can you explain the constraint to use 2LO? There are ways to write sync apps that use OAuth2 and tokens, which has more current library and sample support. You can request "offline" access and save the refresh token in the client. Then you can continually sync that data for the user in question. Is the reason you need 2LO that you need to do this for an entire domain of users without prompting them?

In any case, the tasks api and 2LO should be compatible even if you're having issues with some libraries. I can't comment on the state of all the samples and libraries, but if you follow the steps to approve the tasks api scope for your client_id in ManageOAuthClients and you know the ids of your domain users, and you sign your requests properly, it should 'just work'

于 2013-02-01T22:54:59.153 回答