使用Google Chat API在Apps Script中异步消息的认证授权问题
Google Chat APP异步消息发送问题
根据Google开发者手册,与应用用户交互时无需认证,但发送异步消息时必须进行认证。

我在Apps Script中使用Chat.Spaces.Messages.create方法时,弹出应用设置相关提示,点击允许后出现400无效范围错误。
我认为需要额外权限,于是登录Google Workspace管理员账号为服务账号授予权限,但并未解决问题。

综上,需执行以下操作:
- 在Apps Script的
appsscript.json中添加oauthScopes - 在Google Workspace Admin > Security > API Management > Domain-wide Delegation菜单中为Google Chat API服务账号添加chat scope
希望能成功在Google Chat App中发送异步消息。
内容的提问来源于stack exchange,提问作者IT팀
相关产品推荐
相关产品推荐

