使用Google动作获取用户的电子邮件 [英] Get email from user using Google actions

查看:75
本文介绍了使用Google动作获取用户的电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要使用这里,但是文档讨论的是EMAIL权限,但是当我阅读权限文档时,这里我找不到任何EMAIL权限。有什么帮助吗?如何接收用户的电子邮件?

I want to recieve the user email using Google Actions as documented here but docs talks about EMAIL permission, but when I read the permission docs here I can't find any EMAIL permission. Any help? How can I receive the user email?

推荐答案

是的,很遗憾,助手的SDK没有给您提供电子邮件地址。但是,如果您实现了帐户关联(例如前面提到的艾哈迈德(Ahmed))并使用了简化流程,那么您将收到提供给您的电子邮件;您只需要使用jsonwebtoken库,就可以解码断言JWT并获取电子邮件地址。

Ya, unfortunately the Assistant's SDK doesn't give you the email address. But if you implement account linking (like Ahmed mentioned) and use the Streamlined Flows, then you'll be getting the email provided to you; you just need to use the jsonwebtoken library and you can decode the assertion JWT and grab the email address.

话虽如此,这是在登录和令牌交换期间发生的...不是在实际行动完成期间。您需要发出刷新令牌/访问令牌:S

That being said, this happens during "sign in" and token exchange... not during the actual action fulfillment. You'll need to issue a refresh token / access token :S

这篇关于使用Google动作获取用户的电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆