选择内容分享方式
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本页介绍了开发者在分享受控内容的访问权限时应遵循的最佳实践。您可以在协作活动开始之前或进行期间更新权限。
强烈建议您实现一种可最大限度减少用户摩擦或中断的方法。开发者应在应用访问控制模型中的限制和安全要求与任何用户中断之间保持平衡。
以下列出了几种提供协作活动访问权限的方式。
授予临时访问令牌(推荐)
临时(会过期)访问令牌可提供用户在指定时间段内有效的访问和安全凭据。如需了解详情,请参阅配置临时访问权限。
这种方法可最大限度地减少用户摩擦。拥有链接和临时访问令牌的任何人都可以访问该内容。用户只能在令牌中指定的时间段内拥有访问权限,该令牌会在发起者开始活动时生成。
您可以使用activity 启动状态分享令牌。该令牌可用于兑换临时内容访问权限。临时访问令牌与内容创建时间无关。此方法适用于新内容和现有内容。
下表显示了使用此方法的优点和缺点:
优点 |
缺点 |
尽可能减少用户遇到的障碍 |
过度分享内容的风险 |
允许他人在活动开始后加入 |
|
无需提前了解参与者 |
|
在活动开始前分享
另一种方法是设计 Meet 加载项,以便在用户开始活动之前提示其更新权限。
下表显示了使用此方法的优点和缺点:
优点 |
缺点 |
明确分享可最大限度地降低风险 |
确定参与者可能具有挑战性 |
|
在用户加入时批准访问权限,会带来中等程度的摩擦或中断 |
按需分享
这是一种被动方法,即活动发起者在用户请求访问内容时实时批准请求。如果参与者未正确确定,此方法可能会导致用户体验不佳。因此,我们最不建议使用此方法。
下表显示了使用此方法的优点和缺点:
优点 |
缺点 |
无需提前了解参与者 |
引发高摩擦并打断会议流程 |
明确分享可最大限度地降低风险 |
需要提供在活动开始后更新内容权限的途径 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[],[],null,["# Choose a content sharing method\n\nThis page describes the best practices developers should observe when sharing\naccess to controlled content. Updates to permissions can be done either before a\ncollaborative activity starts or while it's ongoing.\n\nIt's strongly recommended to implement a method that creates the least amount of\nuser friction or disruption. Developers should maintain a balance between the\nconstraints in the app's access control model and security requirements, and\nany user disruption.\n\nThe following are several ways to provide access to collaborative activities.\n\nGrant temporary access token (recommended)\n------------------------------------------\n\nA temporary (expiring) access token provides a user's access and security\ncredentials that are valid within a specified period of time. For more info, see\n[Configure temporary access](https://cloud.google.com/iam/docs/configuring-temporary-access).\n\nThis approach provides the least user friction. The content is accessible to\nanyone with the link and the temporary access token. Users only have access for\nthe duration of time specified in the token, which is generated once the\ninitiator starts the activity.\n\nYou can share a token using the [activity starting\nstate](/workspace/meet/add-ons/guides/collaborate-in-the-add-on). The token can be\nredeemed for temporary content access. The temporary access token is independent\nof the time the content is created. This approach works for new and existing\ncontent.\n\nThe following table shows the advantages and disadvantages of using this\napproach:\n\n| Advantages | Disadvantages |\n|---------------------------------------------------------|-----------------------------|\n| Least amount of friction for users | Risk of oversharing content |\n| Allows people to join after activity started | |\n| Doesn't require knowledge of participants ahead of time | |\n\nShare before activity starts\n----------------------------\n\nAn alternative approach is to design your Meet add-on\nto prompt the user starting the activity to update permissions before beginning.\n\nThe following table shows the advantages and disadvantages of using this\napproach:\n\n| Advantages | Disadvantages |\n|----------------------------------|----------------------------------------------------------------------------|\n| Explicit sharing minimizes risks | Determining participants can be challenging |\n| | Medium amount of friction or interruptions approving access as people join |\n\nShare on-demand\n---------------\n\nThis is a reactive approach where the activity initiator approves requests in\nreal-time as users request access to the content. This method might cause high\nuser friction if participants aren't correctly determined. Therefore, it's the\nleast recommended.\n\nThe following table shows the advantages and disadvantages of using this\napproach:\n\n| Advantages | Disadvantages |\n|---------------------------------------------------------|------------------------------------------------------------------------------|\n| Doesn't require knowledge of participants ahead of time | Triggers high friction and interrupts the flow of the meeting |\n| Explicit sharing minimizes risks | Requires a path to update the content permissions after activity has started |"]]