11

ユーザーが開始してメールを読むためのアクセス権を取得するにはどうすればよいですか?OpenID、OAuth、OAuth2、その他のランダムなソリューションがあるようです。

私がこれまでに思いついた最高のものは、OAuth2とscope=https://mail.google.com/です。

メールへの読み取り専用アクセスを許可し、理想的には次のような許可通知でユーザーを怖がらせない許可はありますか?

「メールの表示と管理アプリケーションを使用していないときにこれらの操作を実行する」

できれば「メールを見る」でお願いします。

4

2 に答える 2

12

前の答えはもはや正確ではありません。最近リリースされたGmailAPIでは、特に「読み取り専用」スコープが許可されています。これは、 https ://developers.google.com/gmail/api/auth/scopesにあります。

「読み取り専用」スコープは次のとおりです:https ://www.googleapis.com/auth/gmail.readonly

https://www.googleapis.com/auth/gmail.readonly
Read all resources and their metadata—no write operations.

https://www.googleapis.com/auth/gmail.compose
Create, read, update, and delete drafts. Send messages and drafts.

https://www.googleapis.com/auth/gmail.send
Send messages only. No read or modify privileges on mailbox.

https://www.googleapis.com/auth/gmail.insert
Insert and import messages only.

https://www.googleapis.com/auth/gmail.labels
Create, read, update, and delete labels only.

https://www.googleapis.com/auth/gmail.modify
All read/write operations except immediate, permanent deletion of threads and messages, bypassing Trash.

https://www.googleapis.com/auth/gmail.metadata
Read resources metadata including labels, history records, and email message headers, but not the message body or attachments.

https://www.googleapis.com/auth/gmail.settings.basic
Manage basic mail settings.

https://www.googleapis.com/auth/gmail.settings.sharing
Manage sensitive mail settings, including forwarding rules and aliases. 

Note: Operations guarded by this scope are restricted to administrative use only. They are only available to G Suite customers using a service account with domain-wide delegation. 

https://mail.google.com/
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.
于 2014-07-24T23:07:09.290 に答える
4

GMail APIのドキュメントには、すべてにアクセスできるスコープは1つしかないと記載されています。

Gmail受信トレイフィードと呼ばれる機能もありますが、これはGoogleAppsドメインでのみ利用できます。

于 2013-01-01T03:21:12.553 に答える