I want to send an email through Google API without the unnecessary OAUTH2 parameters. I only have the access_token and the refresh_token of that user.
How can I send an email through Gmail API through a basic POST request in NodeJS, with Request npm plugin?
There are two methods for attaching OAuth2 access_tokens to a Google API request.
?access_token=oauth2-token
Authorization: Bearer oauth2-token
The second one is prefered for POST requests so the raw HTTP request for sending an email would look something like this.
abraham is correct, but I just thought I'd give you an example.
Don't forget to change the reciever and sender email address for the example to work.