-1

I have a situation where i have to send emails to gmail users using client's login name and password. I can get their login name and password but the problem here is i can't send mails through my web app deployed in amazon cloud connection. I followed this link earlier.

Can i use google identity api so that after sign-in can i get oauth token which can be used in Gmail api in sending mails.

Note: I have a project created in Google developers console with Gmail api enabled and i need mail to be sent from client email address not from the mail through which i created project in google developers console.

Is there any other api which can solve my problem? Idtoken which we receive after successful sign in is same as oauth2token? please help me

calico
  • 9
  • 4

2 Answers2

1

From https://developers.google.com/gmail/api/auth/about-auth: "All requests to the Gmail API must be authorized by an authenticated user. Gmail uses the OAuth 2.0 protocol for authenticating a Google account and authorizing access to user data. You can also use Google+ Sign-in to provide a "sign-in with Google" authentication method for your app."

The Google Identity Toolkit IdToken can not be used to call Google APIs. You need a Google OAuth2 access token to do that.

Jin Liu
  • 2,203
  • 15
  • 13
0

Google Identity solved my problem for my web application...now i can use any google api with those tokens of any client.

calico
  • 9
  • 4