缩小 Gmail IMAP 访问范围
Reduced scope for Gmail IMAP access
我想通过 IMAP
访问 Gmail
,但出于只读目的(使用范围 https://www.googleapis.com/auth/gmail.readonly
)
根据this the scope needed for IMAP
access is https://mail.google.com/
which is defined为:
Full access to the account, including permanent deletion of threads
and messages. This scope should only be requested if your application
needs to immediately and permanently delete threads and messages,
bypassing Trash; all other actions can be performed with less
permissive scopes.
但该范围确实比我需要的要多得多,并且可能会阻止用户向应用授予此权限。
有没有人成功获得 IMAP
只读访问权限?如果没有,任何人都可以阐明为什么需要完全访问权限吗?这是 IMAP
协议的限制吗?
The scope for IMAP and SMTP access is https://mail.google.com/.
IMO 这可能是由于 IMAP 和 SMTP 服务器的性质。通过使用 IMAP 和 SMTP,您可以直接登录邮件服务器。我不认为你会得到任何其他范围来处理它。
如果您使用的是 Gmail API,那么您 运行 通过 API 从 Oauth 身份验证服务器获得访问权限。身份验证服务器将允许您减少所需的 scopes。
我想通过 IMAP
访问 Gmail
,但出于只读目的(使用范围 https://www.googleapis.com/auth/gmail.readonly
)
根据this the scope needed for IMAP
access is https://mail.google.com/
which is defined为:
Full access to the account, including permanent deletion of threads and messages. This scope should only be requested if your application needs to immediately and permanently delete threads and messages, bypassing Trash; all other actions can be performed with less permissive scopes.
但该范围确实比我需要的要多得多,并且可能会阻止用户向应用授予此权限。
有没有人成功获得 IMAP
只读访问权限?如果没有,任何人都可以阐明为什么需要完全访问权限吗?这是 IMAP
协议的限制吗?
The scope for IMAP and SMTP access is https://mail.google.com/.
IMO 这可能是由于 IMAP 和 SMTP 服务器的性质。通过使用 IMAP 和 SMTP,您可以直接登录邮件服务器。我不认为你会得到任何其他范围来处理它。
如果您使用的是 Gmail API,那么您 运行 通过 API 从 Oauth 身份验证服务器获得访问权限。身份验证服务器将允许您减少所需的 scopes。