Title: Gmail 403
Last modified: June 25, 2020

---

# Gmail 403

 *  Resolved [Jason Chong](https://wordpress.org/support/users/dantianhealth/)
 * (@dantianhealth)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/gmail-403/)
 * I am trying to setup Gmail for an account. I have setup the OAuth etc as directed
   and have checked through GSuite for permissions and double checked my entry of
   keys and passwords etc but each time I try and authenticate I get a 403
    Forbidden
   Access to this resource on the server is denied! What am I missing?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/gmail-403/#post-13038026)
 * Hi [@dantianhealth](https://wordpress.org/support/users/dantianhealth/),
 * Thanks for reaching out! Are you getting this error after clicking on ‘Allow 
   plugin to..’ and redirecting back to your site after authenticating your Google
   account? This can be due to security prevention from your hosting company. Most
   probably, mod_security apache module, it filters out certain requests and redirects
   them to a 404 page. You will need to contact your hosting company support team
   and ask to modify the mod_security rule to allow incoming requests from Google.
 * I hope this helps!
 *  Thread Starter [Jason Chong](https://wordpress.org/support/users/dantianhealth/)
 * (@dantianhealth)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/gmail-403/#post-13038765)
 * Hi,
    Thank you. I found the issue is with the use of the [7G Firewall](https://perishablepress.com/7g-firewall/).
   I discovered that commenting out line 26 resolved the issue “RewriteCond %{QUERY_STRING}(
   s)?(ftp|http|inurl|php)(s)?(:(/|%2f|%u2215)(/|%2f|%u2215)) [NC,OR]” The firewall
   author states it is difficult to write an exclusion in the firewall for this 
   referral as the URL it calls is complicated and most likely dynamic based upon
   the account being used. But at least I found the solution!
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/gmail-403/#post-13047690)
 * Hi [@dantianhealth](https://wordpress.org/support/users/dantianhealth/),
 * I’m glad you sorted it out and thanks for taking time to let us know.
 * Have a good one!
 *  Thread Starter [Jason Chong](https://wordpress.org/support/users/dantianhealth/)
 * (@dantianhealth)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/gmail-403/#post-13047727)
 * I hope my solution helps someone else!
 *  [AV WebWorks](https://wordpress.org/support/users/avwebworks/)
 * (@avwebworks)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/gmail-403/#post-13072678)
 * I’m having the same fits.
 * I click on the button to allow the plugin to send via Google, select the desired
   Google account, bypass security warning (app’s not verified but it’s mine so 
   meh), then get to the Confirm your choices dialog (You already gave access to…
   Make sure you trust [website], etc) and when I click Allow, I get the 403/forbidden
   error.
 * I’m a reseller/webmaster with the exact same setup running on near a dozen sites(
   multi-sites and regular setups) with no problem. The only difference with this
   one is that there’s a WP installation in the web root (plugin’s working fine)
   and the problematic site is in a sub-directory with its own WP installation. 
   All the directory/file permissions are 755/644 and there’s nothing in any of 
   the htaccess files except the default WordPress rules.
 * Any ideas?
 *  Plugin Author [Gregor Capuder](https://wordpress.org/support/users/capuderg/)
 * (@capuderg)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/gmail-403/#post-13099893)
 * Hi [@avwebworks](https://wordpress.org/support/users/avwebworks/),
 * I just tested a Gmail mailer configuration on a WP site installed in a subdirectory
   and everything went smoothly.
 * It looks like the redirect from Google back to your WP site is not allowed (403-
   forbidden). Please contact your hosting company and ask them to investigate this
   for you, maybe it’s a firewall setup or a restricted rewrite rule in .htaccess,…
 * Take care!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Gmail 403’ is closed to new replies.

 * ![](https://ps.w.org/wp-mail-smtp/assets/icon-256x256.png?rev=1755440)
 * [WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin](https://wordpress.org/plugins/wp-mail-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mail-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mail-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mail-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mail-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mail-smtp/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [Gregor Capuder](https://wordpress.org/support/users/capuderg/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/gmail-403/#post-13099893)
 * Status: resolved