简体   繁体   中英

get the e-mail address from signed-in google maps

I am trying to add a custom control (which is basically a button-link to another inner site) in a google-map for an specific list of gmail accounts. I have a django server. So, I think I can handle this if I were able to get the gmail address from the google map. Is there a way to do this without using oAuth2.0?

This is what I have in my header

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&key=AIzaSyDCzPs4j72hd2GdajAWPyQunQVlsQcqg5o"></script> 

There is no way Google will allow you to access your users information without OAuth 2.0, even if they are using Google maps from your website and signed in to their Google account. Since you have the API key for (And you have not mentioned for which API it is, I am assuming it is a G+ api key for OAuth2.0). You can follow the following steps in this link to retrieve basic user info such as email id once they have signed into your website using Google account. Refer to this link to get the user info. Specifically for Google API's client Library for Python, Please follow this link .

Hope this would help!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM