目前,我有此代码可以从我的Google日历
https://developers.google.google.google 。
JS代码上的客户端秘密密钥。
我在我的
代码将提示类似的内容
所以我使用
登录& authorize
As you can see, it lists down all dates from google calendar under [email 受保护]
,
但我的问题是,
是否可以从不同的Gmail帐户获取日期日期。
For example, I have 3 users
[email protected] - 如果我授权此电子邮件,它将在此帐户下进行日期
[电子邮件 受保护]
- 如果我授权此电子邮件,它将在此帐户下获取日历
邮件帐户
我的 计划在我的Laravel项目上实施此类功能。我只想知道这种情况是否可能
Currently I have this code to fetch all dates from my google calendar
https://developers.google.com/calendar/api/quickstart/js
As you can notice, there is client id & client secret key on js code.
I gathered it on my [email protected]
Code this will prompt something like this


So I used [email protected]
to login & authorize
As you can see, it lists down all dates from google calendar under [email protected]

But my question is,
Is it possible to fetch calendar dates from different gmail account.
For example, I have 3 users
[email protected]
- If I authorize this email, it will fetch calendar dates under this account
[email protected]
- If I authorize this email, it will fetch calendar dates under this account
[email protected]
- If I authorize this email, it will fetch calendar dates under this account
So basically to fetch calendar dates based on gmail account
I'm planning to implement this type of functionality on my laravel project. I just want to know if this case is possible
发布评论
评论(1)
是的,这是可行的,只要帐户所有者向您的申请提供授权(通过Oauth令牌或客户秘密的授权),
以防您参考一组Google Workspace帐户(并且您想自动化它,这将需要您使用a 服务帐户 =“ https://support.google.com/a/answer/162106” rel =“ nofollow noreferrer”> domain wide Adegation for IT)加上您的应用程序设置为内部,此方式不需要。您要进行申请审核。您的客户秘密将适用于域内的任何这些类型的帐户中的任何一种。
另一方面,如果您参考gmail.com帐户,则可以使用' test用户< /a>'功能,并在此处添加其他Gmail帐户。不过要注意限制。在此选项中,您的客户秘密将不起作用,您需要更改为OAuth身份验证过程。
Yes, this is doable, as long as the account owners provide your application with authorization to do so (either via OAuth token or a client secret)
In case you are referring to a set of Google Workspace Accounts, (and you want to automate it, this will require for you to use a Service Account + enable Domain Wide Delegation for it) plus having your application set to internal, this way it will not require for you to go through an application audit. Your client secret will work for any of these types of accounts inside your domain.
On the other hand, If you are referring to Gmail.com accounts you can use the ‘Test Users’ feature and add those other Gmail accounts there. Be mindful of the limitations though. In this option, your client secret will not work, you will need to change to an OAuth authentication process.