Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29905

Invalid scope trying get authorization token for Gmail SMTP access

$
0
0

I'm trying out my new SMTP library and trying to use it to send mail via Gmail. To do that, I need an OAuth2 access token. I've set up an OAuth2 client account in the Google API console, enabled the Gmail API and added the https://mail.google.com/ scope in the OAuth consent screen setup. Despite this, the POST request to https://accounts.google.com/o/oauth2/device/code returns the error invalid_scope. Switching the scope to email makes the request go through. I tried two different HTTP clients to be sure this wasn't some freak encoding problem.

What am I doing wrong?


Viewing all articles
Browse latest Browse all 29905

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>