gpt4 book ai didi

angular - 带有 Angular Submit 的 Google Calendar API

转载 作者:行者123 更新时间:2023-12-04 10:51:03 25 4
gpt4 key购买 nike

我是使用 Angular 的新手,我想将它与 Google Calendar API 集成,但我没有在网上找到任何有用的东西。我有一个提交表单,当用户按下提交时,会在企业日历上创建一个日历事件,并向点击提交的用户发送邀请(他们输入他们的电子邮件作为字段之一)。我不想让他们登录网站,因为真的没有必要。

https://developers.google.com/calendar/quickstart/js

我遵循了本教程,但是我从哪里开始,如何将它与我的 Angular 代码连接?

最佳答案

如果您不希望用户明确同意,则必须使用 service accounts 在服务器端实现此功能.
从文档:

Google APIs such as the Prediction API and Google Cloud Storage can act on behalf of your application without accessing user information. In these situations your application needs to prove its own identity to the API, but no user consent is necessary. Similarly, in enterprise scenarios, your application can request delegated access to some resources.

For these types of server-to-server interactions you need a service account, which is an account that belongs to your application instead of to an individual end-user. Your application calls Google APIs on behalf of the service account, and user consent is not required. (In non-service-account scenarios, your application calls Google APIs on behalf of end-users, and user consent is sometimes required.)


您可以在以下链接中阅读有关服务帐户以及如何在您的应用程序中使用它们的更多信息:
  • Using OAuth 2.0 for Server to Server Applications
  • 关于angular - 带有 Angular Submit 的 Google Calendar API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59472856/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com