Google API 适用范围:email 和 https://www.googleapis.com/auth/plus.profile.emails.read 有什么区别

Google API Scope: What's the difference between email and https://www.googleapis.com/auth/plus.profile.emails.read

对于 Google API 范围, 访问用户的电子邮件 https://www.googleapis.com/auth/userinfo.email范围 根据 https://developers.google.com/+/api/oauth#email

已弃用

所以新范围是 "email" 而不是长的 url。

但是范围之间有什么区别 "email" 和“https://www.googleapis.com/auth/plus.profile.emails.read”?

email 使您可以访问经过身份验证的用户 Google 电子邮件地址,例如name@gmail.com.

"emails": [
  {
   "value": "name@gmail.com",
   "type": "account"
  }
 ]

https://www.googleapis.com/auth/plus.profile.emails.read 使您可以访问用户个人资料中已验证的所有 public 个电子邮件地址。

"emails": [
  {
   "value": "name@gmail.com",
   "type": "account"
  },
  {
   "value": "name@gmail.com",
   "type": "home"
  },
  {
   "value": "name@example.com",
   "type": "home"
  }
 ]