Get email from user using Google actions

前端 未结 3 1953
一整个雨季
一整个雨季 2020-12-15 13:55

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 EM

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-15 14:45

    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.

    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

提交回复
热议问题