Get all email addresses of user using Google API

前端 未结 4 1735
粉色の甜心
粉色の甜心 2021-02-15 12:20

For my own gmail account, I have multiple email addresses associated with it. For example, I have an email address from my university that is associated with my gmail, and I ca

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-15 12:51

    Your description is a little vague. Are you talking about send-as alias accounts or alternate email accounts?

    Send-as Alias

    Either way, you can interact with the send-as accounts here: Manage Send-as Alias

    Alternate Emails via Admin SDK

    • As for alternate email accounts, they can be accessed via:
      • Admin SDK: https://developers.google.com/admin-sdk/directory/v1/guides/manage-user-aliases?hl=en
      • Google Apps Script: https://developers.google.com/apps-script/reference/gmail/gmail-app#getAliases()
    • Additional info here on how the accounts work.
      • Email addresses associated with your account
      • Alternate email addresses and other Google products
      • Connect other email accounts to your Google Account

    Federated Login

    Also, I'm not exactly sure how you are trying to incorporate this functionality into your site but another area I recommend checking out is Federated Login for Google Account Users. This might also provide you with the functionality you seek.

    Using federated login (also known as federated identity), your website or application can allow visitors to sign in using their Google user accounts. Federated login frees users from having to set up separate login accounts for different websites, and frees you from the task of implementing login authentication measures.

提交回复
热议问题