Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fetch mails from gmail without using "Application Specific Password" [closed]

In PHP, I need to fetch mails from gmail without using Application Specific Password when 2 step verification is enabled. I already tried fetching mails with Application Specific Password using imap and its working fine. But I don't want that. I need without using app specific password I should able to fetch mails from gmail.

For example: if you go through nimble.com, you can login through google and there they are fetching emails from gmail using login credentials only with or without 2-step verification.

like image 208
Sathish Avatar asked Dec 06 '25 07:12

Sathish


1 Answers

You need to use the OAuth 2.0 protocol to authorize the Gmail API. I think the OAuth 2.0 Playground is a great way to learn how it works. Just set your scopes to the Gmail API v1 ones to try the Gmail API.

Then you can check out the PHP client library to learn how to use it in your own application.

like image 119
Tholle Avatar answered Dec 07 '25 19:12

Tholle