Support » Plugin: Postman SMTP Mailer/Email Log » Google won't "Grant Permission"

  • Resolved mylittlerhythms

    (@mylittlerhythms)


    Hey there! So I am having an issues with the last step up the wizard. I have successfully setup the api and credentials but on the last step of “You have configured OAuth 2.0 authentication, but have not received permission to use it. Grant permission with Google.” I will click on the “Grant Access” button, but it doesn’t fully “grant” the permissions and I am left with the message:

    You have configured OAuth 2.0 authentication, but have not received permission to use it. Grant permission with Google.

    How can I fix this? Thanks in advance =)

    Also I plan to use this with the Newsletter plugin ( http://www.thenewsletterplugin.com/plugins/newsletter ) are there any known issues?

    https://wordpress.org/plugins/postman-smtp/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Jason Hendriks

    (@jasonhendriks)

    Hi there! Thanks for using the plugin.

    Is it possible the plugin is being blocked from reaching http://www.googleapis.com on port 443? OAuth 2.0 needs to be able to reach Google at that socket to get your authentication token and refresh it.

    This user had a similar issue… https://wordpress.org/support/topic/error-when-authenticating-through-gmail?replies=11

    You can use the Postman Connectivity Tester to make sure port 443 is open.

    ✅ 🔒 Port 25 can be used for SMTP to smtp.gmail.com. Warning: connected to securedservers.com instead of gmail.com. This may be a problem.
    ✅ 🔒 Port 587 can be used for SMTP to smtp.gmail.com. Warning: connected to securedservers.com instead of gmail.com. This may be a problem.
    ✅ 🔒 Port 443 can be used to send Gmail with the Gmail API.
    ✅ 🔒 Port 465 can be used for SMTP to smtp.gmail.com. Warning: connected to securedservers.com instead of gmail.com. This may be a problem.

    Plugin Author Jason Hendriks

    (@jasonhendriks)

    Oh wow! Look al that!! SecuredServers.com has intercepted your request to gmail.com!! That is so exciting! This is a feature I added, but till now I had no proof that worked, for hosts that redirect requests to external servers back to themselves! This is so great to have proof! It would be absolutely impossible to send mail to Google in this case without the Gmail API 😀 Thank-you for posting.

    As for your OAuth issue, does Postman not show any other error after you return from Google? Something like : Error authenticating with this Client ID. [Error executing wp_remote_post: Failed to connect to http://www.googleapis.com port 443: Connection refused]

    Would you we willing to help me debug this issue by install the Debug plugin?

    Is it a good feature to have? lol. Will it effect emails being sent out or is it a good thing?

    As far as errors, nothing shows up. Yes I can install the debug plugin, what is the link to download?

    Plugin Author Jason Hendriks

    (@jasonhendriks)

    Is it a good feature to have? lol. Will it effect emails being sent out or is it a good thing?

    Haha. Contrary to my excitement it’s a very BAD thing. It’s basically a man-in-the-middle attack, thought they may not intend to be malicious – like steal your password or inject ads into your messages. See:

    The plugin is warning you that the same thing could happen to you, but because you (are trying to) use the Gmail API you’re safe.

    As far as errors, nothing shows up. Yes I can install the debug plugin, what is the link to download?

    1. Set Postman’s LogLevel to Trace (Postman -> Manually Configure -> Advanced)
    2. Install and activate Debug – a new menu appears in your left nav
    3. Enable WP_DEBUG_LOG. Disable WP_DEBUG_DISPLAY
    4. Try the Grant again with Postman
    5. Send me the log file
    6. Set Postman’s LogLevel back to Error

    https://wordpress.org/plugins/debug/
    http://www.codingmonkey.ca/contact/

    Ok sent the error log =) Thanks for the quick help!

    Plugin Author Jason Hendriks

    (@jasonhendriks)

    Hi Bryan.. I’ve made a fix based on the log you send me…please let me know if that fixes your issue!

    1. Deactive and Delete Postman from your site
    2. Download Postman v1.6.6a and upload it to your plugins page. Activate it.
    3. Try the Grant again

    If it works I’ll release it!

    Hey Jason. I tried that but don’t think it helped. When I clicked on Grant Access, it just redirected to my home page but didn’t seem to take effect.

    I sent you a message on Skype, maybe I can give you access to my wp-admin so you can see more in depth the issue?

    Plugin Author Jason Hendriks

    (@jasonhendriks)

    Ah, I that for sure I solved it >:-(

    Here’s how OAuth2 works:

    1. Postman asks your browser to redirect to Google, and passed some info like your Client ID, the redirect URL, a state code, your email address
    2. Google asks you to login based on the email address, looks up your client ID to make sure it’s valid, then asks you to confirm your authentication for Postman to access GMail.
    3. Then google asks your browser to redirect back to WordPress, passing back a Grant Code and postman’s original state code
    4. Postman looks for the grant code, validates the original state code (which acts as a nonce) and then creates a second request directly to Google which you don’t see, to trade the grant code for an oAuth access token and refresh token

    Your site is breaking at step 4. Postman can’t find the grant code. Can you think of anything that might be stripping out this request parameter? WordPress security plugin? Reverse proxy on your web server?

    Plugin Author Jason Hendriks

    (@jasonhendriks)

    Bryan said:

    LOL I think it worked now!
    Postman Setup
    The OAuth 2.0 authorization was successful. Ready to send e-mail.
    all works

    Fixed in Postman v1.6.6

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Google won't "Grant Permission"’ is closed to new replies.