GMail SMTP with Send-Only Scope? (https://www.googleapis.com/auth/gmail.send)

Apparently the full permission scope is required to do XOAUTH2 authentication in the SMTP protocol for GMail.

See these examples
https://www.example-code.com/vbnet/gmail_smtp_oauth2_access_token.asp
https://www.example-code.com/vbnet/gmail_smtp_send_using_oauth2_token.asp

The full permission scope is “https://mail.google.com/”

The send-only scope is: “https://www.googleapis.com/auth/gmail.send”

Google claims that it’s possible to send email with the send-only scope, but we’ve found it is  simply possible.  It just doesn’t work.

Don’t know why. Perhaps it is possible via the GMail REST API but not via the SMTP protocol?

In any case, it’s probably better to use App Passwords.  See https://www.example-code.com/csharp/gmail_app_password.asp

 

Tags :