Home » PHP » PHP Import Email Addresses from Gmail Accounts

PHP Import Email Addresses from Gmail Accounts

How to import user email addresses from gmail account using php.Now I’m going to explain how to import email addresses using google auth API.
The Google Contacts Data API allows client applications to view and update a user’s contacts. Contacts are stored in the user’s Google Account; most Google services have access to the contact list.

Step-1

First you must add or manage the domain name in the Google account by using following url.
https://accounts.google.com/ManageDomains

More Information about this.
http://code.google.com/apis/accounts/docs/RegistrationForWebAppsAuto.html

1-Add your domain name here.
Add or Manage a Domain name-Google

2-Verify your domain name(if added new domain name).
Add-or-Manage-Domain-name-step-2

3-After the successfully message click in the “Continue” link.Then display a new page to Agreement.But still domain name is inactive status.Click that button to agree and manage the domain name.
Add-or-Manage-Domain-name-3

4-Now fill the fields in the manage domain name page.Then click in the “Save” Button.
Add-or-Manage-Domain-name-4

5-After save,you can view your “Consumer Key” and “Consumer Secret”.Copy these info and paste in your config file.
Add-or-Manage-Domain-name-5

Step-2

Ok.Now Domain name is created.Then check php_curl extension is enabled in the web server.
Add your keys in the Config.php file.

Step-3

Creating the GmailOath.phpfile.

Step-4

Creating Contacts.php file.

Step-5

Finally Create index.php file.

That’s all.

View Demo

Download Source(8.5 KB)

Tags

Similar posts

  • Pingback: PHP Get unread Emails count in Gmail Account - FAQ()

  • Mary Smith

    Our Gmail Tech Support Engineer Read More2 for Account Setting or Change Password we help you 24*7 any types of gmail problem.

  • test fdgdffgd

    It is not working by clicking view demo

    • Hi,
      The demo is not working and I have disabled that page for security purposes.
      Please follow the guideline and run it in your web server or localhost. Must be work.

      Thanks

  • Jared

    Thanks for your article!
    When I need to import gmail contacts in my Magento, I used Invitations extension by Plumrocket. A superb tool, when you need to import your contacts fast!